The following commit has been merged in the master branch:
commit 94605ac4e7f2e4732c4c174a1a0b249b0b39196f
Author: James Vega <[email protected]>
Date: Sun Jul 11 15:51:40 2010 -0400
Unify how scripts call which to detect utilities.
Signed-off-by: James Vega <[email protected]>
diff --git a/scripts/diff2patches.sh b/scripts/diff2patches.sh
index cbd1700..a26964c 100755
--- a/scripts/diff2patches.sh
+++ b/scripts/diff2patches.sh
@@ -49,10 +49,10 @@ case "$1" in
--version) version; exit 0 ;;
esac
-[ ! -z "$(which lsdiff)" ] || {
+if ! which lsdiff >/dev/null 2>&1; then
echo "lsdiff was not found in \$PATH, package patchutils probably not
installed!"
exit 1
-}
+fi
diffgz="$1"
diff --git a/scripts/getbuildlog.sh b/scripts/getbuildlog.sh
index 11a771a..3f7963f 100644
--- a/scripts/getbuildlog.sh
+++ b/scripts/getbuildlog.sh
@@ -65,7 +65,7 @@ EOT
[ $# -ge 1 ] && [ $# -le 3 ] || { usage && exit 1; }
-if [ ! -x "`which wget 2>/dev/null`" ]; then
+if ! which wget >/dev/null 2>&1; then
echo "$PROGNAME: this program requires the wget package to be installed";
exit 1
fi
--
Git repository for devscripts
--
To unsubscribe, send mail to [email protected].