mirror of
https://github.com/limosek/zaf.git
synced 2024-11-13 05:59:06 +01:00
Internal which now search in more dirs
This commit is contained in:
parent
b80fd5ce7f
commit
72ef383146
@ -21,8 +21,9 @@ zaf_which() {
|
||||
if which >/dev/null 2>/dev/null; then
|
||||
which "$1"
|
||||
else
|
||||
[ -x /bin/$1 ] && { echo /bin/$1; return; }
|
||||
[ -x /usr/bin/$1 ] && { echo /usr/bin/$1; return; }
|
||||
for i in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin; do
|
||||
[ -x $i/$1 ] && { echo $i/$1; return; }
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
@ -24,8 +24,9 @@ zaf_which() {
|
||||
if which >/dev/null 2>/dev/null; then
|
||||
which "$1"
|
||||
else
|
||||
[ -x /bin/$1 ] && { echo /bin/$1; return; }
|
||||
[ -x /usr/bin/$1 ] && { echo /usr/bin/$1; return; }
|
||||
for i in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin; do
|
||||
[ -x $i/$1 ] && { echo $i/$1; return; }
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user