projects/aports·blob master · refs

18 lines · 393 B

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