.lib/sh/stubexec.sh

changeset 960
4921edc4b518
parent 958
b883fb5c4792
child 992
4e3e37ce84bc
equal deleted inserted replaced
959:4a5aaef00594 960:4921edc4b518
18 echo "$binpath" 18 echo "$binpath"
19 done 19 done
20 } 20 }
21 21
22 realbin() { 22 realbin() {
23 which -a $(basename $1) | 23 local bn="$(basename $1)"
24 which -a "$bn" |
24 grep -v "$(realpath $1)" | 25 grep -v "$(realpath $1)" |
25 shim_filter | 26 shim_filter "$bn" |
26 head -n 1 27 head -n 1
27 } 28 }
28 29
29 stubexec() { 30 stubexec() {
30 local real_bin="$(realbin "$0")" 31 local real_bin="$(realbin "$0")"

mercurial