bash on bash

This commit is contained in:
Arturo Filastò 2020-01-30 11:38:30 +01:00
parent 52332c0977
commit 2a7579bf25

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
set -e set -e
buildtags="" buildtags=""
@ -6,10 +6,17 @@ ldflags="-s -w"
if [ "$1" = "bindata" ]; then if [ "$1" = "bindata" ]; then
GO_BINDATA_V=$(go-bindata -version | grep go-bin | cut -d ' ' -f2) GO_BINDATA_V=$(go-bindata -version | grep go-bin | cut -d ' ' -f2)
[[ "$GO_BINDATA_V" == "3.2.0" ]] && echo "Updating bindata" || exit "Wrong go-bindata-version" if [ "$GO_BINDATA_V" = "3.2.0" ]; then
go-bindata -nometadata -o internal/bindata/bindata.go -pkg bindata data/... echo "Updating bindata"
echo "DONE" go-bindata -nometadata -o internal/bindata/bindata.go -pkg bindata data/...
exit 0 echo "DONE"
exit 0
else
echo "Wrong go-bindata-version"
echo "Please install go-bindata with:"
echo " go get -u github.com/shuLhan/go-bindata/..."
exit 1
fi
fi fi
if [ "$1" = "windows" ]; then if [ "$1" = "windows" ]; then