Some other scripts: Replace use of which with type -p
This stanza is clone-and-hacked from vars.sh.frag :-( but I can't
easily reuse it because that does quite some Other Stuff.
Ian Jackson
2 years ago
26 | 26 | |
27 | 27 | if [ -n "$DEBCARGO" ]; then |
28 | 28 | true |
29 | elif which debcargo >/dev/null; then | |
30 | DEBCARGO=$(which debcargo) | |
29 | elif type -p debcargo >/dev/null 2>&1; then | |
30 | DEBCARGO=$(type -p debcargo) | |
31 | 31 | elif [ -f "$HOME/.cargo/bin/debcargo" ]; then |
32 | 32 | DEBCARGO="$HOME/.cargo/bin/debcargo" |
33 | 33 | else |