yggdrasil-go/build

26 lines
418 B
Plaintext
Raw Normal View History

2018-02-18 16:07:27 -06:00
#!/bin/sh
while getopts ud option
do
case "${option}"
in
u) UPX=true;;
d) DEBUG=true;;
esac
done
2017-12-28 22:16:20 -06:00
export GOPATH=$PWD
echo "Downloading..."
go get -d -v
2017-12-28 22:16:20 -06:00
go get -d -v yggdrasil
for file in *.go ; do
echo "Building: $file"
#go build $@ $file
if [ $DEBUG ]; then
go build -tags debug -v $file
else
go build -ldflags="-s -w" -v $file
fi
if [ $UPX ]; then
upx --brute ${file/.go/}
fi
2017-12-28 22:16:20 -06:00
done