diff --git a/autogen.sh b/autogen.sh index 5c105ccd..394e6f7a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -6,20 +6,25 @@ else LIBTOOLIZE='libtoolize' fi -if [ ! -x "`which $LIBTOOLIZE 2>/dev/null`" ] ; then +command -v command >/dev/null 2>&1 || { + echo "command is required, but wasn't found on this system" + exit 1 +} + +command -v $LIBTOOLIZE >/dev/null 2>&1 || { echo "libtool is required, but wasn't found on this system" exit 1 -fi +} -if [ ! -x "`which autoconf 2>/dev/null`" ] ; then +command -v autoconf >/dev/null 2>&1 || { echo "autoconf is required, but wasn't found on this system" exit 1 -fi +} -if [ ! -x "`which automake 2>/dev/null`" ] ; then +command -v automake >/dev/null 2>&1 || { echo "automake is required, but wasn't found on this system" exit 1 -fi +} if autoreconf --version > /dev/null 2>&1 ; then exec autoreconf -ivf diff --git a/test/default/nacl-test-wrapper.sh b/test/default/nacl-test-wrapper.sh index fc4af65f..8e313706 100755 --- a/test/default/nacl-test-wrapper.sh +++ b/test/default/nacl-test-wrapper.sh @@ -16,7 +16,10 @@ else fi fi -which python >/dev/null 2>&1 || \ +command -v command >/dev/null 2>&1 || \ + { echo "command is required, but wasn't found on this system"; exit 1; } + +command -v python >/dev/null 2>&1 || \ { echo >&2 "Python not found. Aborting."; exit 1; } SEL_LDR=$(find "$NACL_SDK_ROOT" -name sel_ldr.py | head -n 1)