summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-06-14 22:56:28 +0200
committerJakob Unterwurzacher2016-06-14 22:56:28 +0200
commita2c73cfde5a50bb8227a6704117e7794490ed88c (patch)
tree6f5f014408d40dfd80f9f7f97210a984d4565cce
parent393e531afd64ad6c5d1db4c36312a29233c8d3f2 (diff)
build.bash: fail early if the go binary does not exist
This used to fail in an ugly way: $ ./build.bash ./build.bash: line 13: go: command not found ./build.bash: line 15: [: too many arguments ./build.bash: line 20: go: command not found
-rwxr-xr-xbuild.bash3
1 files changed, 3 insertions, 0 deletions
diff --git a/build.bash b/build.bash
index 3a3684e..c7731ca 100755
--- a/build.bash
+++ b/build.bash
@@ -9,6 +9,9 @@ GITVERSION=$(git describe --tags --dirty)
# go-fuse version according to git
GITVERSIONFUSE=$(cd $GOPATH/src/github.com/hanwen/go-fuse && git rev-parse --short HEAD)
+# Make sure we have the go binary
+go version > /dev/null
+
# go version go1.5.1 linux/amd64
V=$(go version | cut -d" " -f3 | cut -c3-5)