File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /bin/sh
22
33has_ldconfig () {
44 hash ldconfig 2> /dev/null
55}
66
77has_system_lib () {
8- local regex=" lib$1 .+(so|dylib)"
8+ regex=" lib$1 .+(so|dylib)"
99
1010 # Add /sbin to path as ldconfig is located there on some systems - e.g. Debian
1111 # (and it still can be used by unprivileged users):
1212 PATH=" $PATH :/sbin"
1313 export PATH
14- # Try using ldconfig on linux systems
15- if $( has_ldconfig) ; then
14+
15+ # Try using ldconfig on Linux systems
16+ if has_ldconfig; then
1617 for _ in $( ldconfig -p 2> /dev/null | grep -E " $regex " ) ; do
1718 return 0
1819 done
1920 fi
2021
2122 # Try just checking common library locations
2223 for dir in /lib /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu; do
23- test -d $dir && ls $dir | grep -E " $regex " && return 0
24+ test -d " $dir " && echo " $dir " / * | grep -E " $regex " && return 0
2425 done
2526
2627 return 1
You can’t perform that action at this time.
0 commit comments