Use `command -v` rather than `which`
authorEmily <vcs@emily.moe>
Mon, 2 Sep 2019 23:57:32 +0000 (00:57 +0100)
committerEmily <vcs@emily.moe>
Mon, 2 Sep 2019 23:57:32 +0000 (00:57 +0100)
tests/simple/run-test.sh
tests/simple_abc9/run-test.sh

index 967ac49f25553decbb5fab3cddd236f993a48b19..f20fd0d30bf1ea3eb91c163d262676b6107568ce 100755 (executable)
@@ -12,7 +12,7 @@ done
 shift "$((OPTIND-1))"
 
 # check for Icarus Verilog
-if ! which iverilog > /dev/null ; then
+if ! command -v iverilog > /dev/null ; then
   echo "$0: Error: Icarus Verilog 'iverilog' not found."
   exit 1
 fi
index 8df6994e317e34068d19cbc3880a4e9ab2f2679f..0d4262005fd3b207cc725ae689f0b3023b25a92a 100755 (executable)
@@ -12,7 +12,7 @@ done
 shift "$((OPTIND-1))"
 
 # check for Icarus Verilog
-if ! which iverilog > /dev/null ; then
+if ! command -v iverilog > /dev/null ; then
   echo "$0: Error: Icarus Verilog 'iverilog' not found."
   exit 1
 fi