Update of /cvsroot/linux-vax/toolchain/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25727
Modified Files:
build_toolchain.sh initial_cvs_checkout.sh
Log Message:
- Use `command' instead of `which' to determine availability of some
given command. This is POSIX conformant and actually works on machines
while `which' *may* exit without error in *any* case.
Index: build_toolchain.sh
===================================================================
RCS file: /cvsroot/linux-vax/toolchain/scripts/build_toolchain.sh,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- build_toolchain.sh 4 Feb 2006 09:41:37 -0000 1.63
+++ build_toolchain.sh 14 Mar 2006 09:19:10 -0000 1.64
@@ -24,14 +24,14 @@
#
REQ_TOOLS="flex bison"
for tool in ${REQ_TOOLS}; do
- if ! which $tool > /dev/null; then
+ if ! command -v $tool > /dev/null 2>&1; then
echo "Error: $tool is required by `basename $0` but was not found on your system." >&2
exit 1
fi
done
WARN_TOOLS="runtest"
for tool in ${WARN_TOOLS}; do
- if ! which $tool > /dev/null; then
+ if ! command -v $tool > /dev/null 2>&1; then
echo "Warning: $tool is possibly needed by `basename $0` but was not found on your system." >&2
fi
done
Index: initial_cvs_checkout.sh
===================================================================
RCS file: /cvsroot/linux-vax/toolchain/scripts/initial_cvs_checkout.sh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- initial_cvs_checkout.sh 21 Dec 2005 09:08:06 -0000 1.10
+++ initial_cvs_checkout.sh 14 Mar 2006 09:19:11 -0000 1.11
@@ -14,7 +14,7 @@
#
REQ_TOOLS="cvs svn"
for tool in $REQ_TOOLS; do
- if ! which $tool > /dev/null; then
+ if ! command -v $tool > /dev/null 2>&1; then
echo "Error: $tool is required by `basename $0` but was not found on your system." >&2
exit 1
fi
|