* Thomas Hood
| What is the best way to run a command if and only if it is on the PATH?
findcommand() {
while [ "$#" -ge 1 ]; do
P="$PATH"
while [ "$P" ]; do
D=${P%%:*}
P=${P#*:}
if [ "$D" = "$P" ]; then
P=
fi
(cc:ed to #218530)
Guilherme de S. Pastore wrote to #289732:
> The attached patches make your maintainer scripts behave just like a
> package using debhelper would
The patch makes use of "which". The problem with "which" is supposed to
be that it is in /usr/bin/ and (as Ian Jackson wrote in #21
2 matches
Mail list logo