tldconfig - mkports - recipes for building multiple softwares with mk(1)
 (HTM) git clone git://z3bra.org/mkports
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       tldconfig (393B)
       ---
            1 #!/bin/sh
            2 scan_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
           14 while getopts "nNvXvf:C:r:" opt; do
           15         :
           16 done
           17 shift $(( $OPTIND - 1 ))
           18 [ $# -gt 0 ] && scan_dirs "$@"