replace uses of which with type
This gets rid of:
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
I like the output from `type`, so I used that.
Ian Jackson
2 years ago
10 | 10 | |
11 | 11 | abort() { local x=$1; shift; for i in "$@"; do echo >&2 "$0: abort: $i"; done; exit "$x"; } |
12 | 12 | |
13 | which grep-dctrl >/dev/null || abort 1 "grep-dctrl not found, install dctrl-tools" | |
14 | which aptitude >/dev/null || abort 1 "aptitude not found, install it" | |
15 | which gawk >/dev/null || abort 1 "gawk not found, install gawk" | |
13 | type grep-dctrl >/dev/null || abort 1 "grep-dctrl not found, install dctrl-tools" | |
14 | type aptitude >/dev/null || abort 1 "aptitude not found, install it" | |
15 | type gawk >/dev/null || abort 1 "gawk not found, install gawk" | |
16 | 16 | |
17 | 17 | ARCHIVE="${ARCHIVE:-unstable}" |
18 | 18 | ARCHIVT="${ARCHIVT:-testing}" |