Improve shell scripts

This commit is contained in:
James Shubin
2016-02-10 22:20:45 -05:00
parent 40476a66c2
commit e921dfa498
3 changed files with 6 additions and 4 deletions

View File

@@ -7,8 +7,8 @@ if env | grep -q '^TRAVIS=true$'; then
fi
if [ $travis -eq 0 ]; then
YUM=`which yum`
APT=`which apt-get`
YUM=`which yum 2>/dev/null`
APT=`which apt-get 2>/dev/null`
if [ -z "$YUM" -a -z "$APT" ]; then
echo "The package managers can't be found."
exit 1
@@ -34,5 +34,6 @@ cd -
rm -rf etcd # clean up to avoid failing on upstream gofmt errors
go get ./... # get all the go dependencies
go get golang.org/x/tools/cmd/vet # add in `go vet` for travis
[ -e "$GOBIN/mgmt" ] && rm -f "$GOBIN/mgmt" # the `go get` version has no -X
go get golang.org/x/tools/cmd/vet # add in `go vet` for travis
go get golang.org/x/tools/cmd/stringer # for automatic stringer-ing