diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-04-16 23:08:04 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-04-16 23:08:04 -0500 |
commit | d3f0fcf2e487273f967d8e61db34cca1e1a12452 (patch) | |
tree | 44b59143ed2c10f85fc296fb3dfd3d3ebab74e4c /system/musl/ldconfig | |
parent | 8cffe91358997061849dc3fac861bd7a4631f3cc (diff) | |
download | packages-d3f0fcf2e487273f967d8e61db34cca1e1a12452.tar.gz packages-d3f0fcf2e487273f967d8e61db34cca1e1a12452.tar.bz2 packages-d3f0fcf2e487273f967d8e61db34cca1e1a12452.tar.xz packages-d3f0fcf2e487273f967d8e61db34cca1e1a12452.zip |
system/musl: not-new package
Diffstat (limited to 'system/musl/ldconfig')
-rw-r--r-- | system/musl/ldconfig | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/system/musl/ldconfig b/system/musl/ldconfig new file mode 100644 index 000000000..ccf7c2aa4 --- /dev/null +++ b/system/musl/ldconfig @@ -0,0 +1,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 "$@" |