diff options
author | Klaus Aehlig <aehlig@google.com> | 2017-08-28 12:41:52 +0200 |
---|---|---|
committer | Vladimir Moskva <vladmos@google.com> | 2017-08-28 16:09:48 +0200 |
commit | 27db2d8f0923751f99ea824096188153d49839ea (patch) | |
tree | 2f3df444c019216e30e8596c0f1ed85aa59309ec | |
parent | 26ad43dff2fb326f2674cafcf511ba8d9c9142c2 (diff) |
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
-rwxr-xr-x | compile.sh | 4 | ||||
-rw-r--r-- | src/test/docker/Dockerfile.centos6.7 | 2 | ||||
-rw-r--r-- | src/test/docker/Dockerfile.fedora23 | 2 |
3 files changed, 4 insertions, 4 deletions
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 } diff --git a/src/test/docker/Dockerfile.centos6.7 b/src/test/docker/Dockerfile.centos6.7 index 1d7d665f3a..43bbf3d43f 100644 --- a/src/test/docker/Dockerfile.centos6.7 +++ b/src/test/docker/Dockerfile.centos6.7 @@ -3,7 +3,7 @@ FROM centos:centos6.7 RUN yum -y upgrade RUN yum -y install \ - wget which git findutils binutils \ + wget git findutils binutils \ zip unzip tar gzip zlib-devel \ clang gcc gcc-c++ \ java java-devel java-1.8.0-openjdk-devel \ diff --git a/src/test/docker/Dockerfile.fedora23 b/src/test/docker/Dockerfile.fedora23 index baab0d28b6..66e16474c0 100644 --- a/src/test/docker/Dockerfile.fedora23 +++ b/src/test/docker/Dockerfile.fedora23 @@ -2,7 +2,7 @@ FROM fedora:23 RUN dnf -y update && dnf clean all RUN dnf -y install \ - which findutils binutils gcc tar git \ + findutils binutils gcc tar git \ gzip zip unzip zlib-devel \ clang java java-devel python \ && dnf clean all |