diff options
author | Jakob Unterwurzacher | 2016-06-14 22:56:28 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-06-14 22:56:28 +0200 |
commit | a2c73cfde5a50bb8227a6704117e7794490ed88c (patch) | |
tree | 6f5f014408d40dfd80f9f7f97210a984d4565cce /build.bash | |
parent | 393e531afd64ad6c5d1db4c36312a29233c8d3f2 (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
Diffstat (limited to 'build.bash')
-rwxr-xr-x | build.bash | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |