blob: ccf7c2aa4d2f779e86bdcc0cd681f8f2361f1e85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
scan_dirs() {
scanelf -qS "$@" | while read SONAME FILE; do
TARGET="${FILE##*/}"
LINK="${FILE%/*}/$SONAME"
case "$FILE" in
/lib/*|/usr/lib/*|/usr/local/lib/*) ;;
*) [ -h "$LINK" -o ! -e "$LINK" ] && ln -sf "$TARGET" "$LINK"
esac
done
return 0
}
# eat ldconfig options
while getopts "nNvXvf:C:r:" opt; do
:
done
shift $(( $OPTIND - 1 ))
[ $# -gt 0 ] && scan_dirs "$@"
|