From 27db2d8f0923751f99ea824096188153d49839ea Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 28 Aug 2017 12:41:52 +0200 Subject: Replace which by bash-builtin hash Reportedly, which is not installed by default on all non-windows systems bazel is used. As we only use which to test if a program can be found on PATH, use the bash builtin hash command. While there - replace the search for [ by a search for tr, a program we care more, as [ is the builtin test anyway, - fix a typo in the name of the GNU tools collection searched for. Change-Id: Id78737eba10e96c6fa41ca68a47102ab28e6031f PiperOrigin-RevId: 166685117 --- compile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compile.sh') diff --git a/compile.sh b/compile.sh index e481690e27..f8af2269c8 100755 --- a/compile.sh +++ b/compile.sh @@ -36,8 +36,8 @@ esac # Check that the bintools can be found, otherwise we would see very confusing # error messages. -which [ >&/dev/null || { - echo >&2 "ERROR: cannot locate GNU bintools; check your PATH." +hash tr >&/dev/null || { + echo >&2 "ERROR: cannot locate GNU coreutils; check your PATH." echo >&2 " (You may need to run 'export PATH=/bin:/usr/bin:\$PATH)'" exit 1 } -- cgit v1.2.3