Merge pull request #138 from neilalexander/dedwarf

Update build script
This commit is contained in:
Arceliar 2018-06-21 09:33:28 -05:00 committed by GitHub
commit 12bcb6cc1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

20
build
View File

@ -1,11 +1,25 @@
#!/bin/sh #!/bin/sh
while getopts ud option
do
case "${option}"
in
u) UPX=true;;
d) DEBUG=true;;
esac
done
export GOPATH=$PWD export GOPATH=$PWD
echo "Downloading..." echo "Downloading..."
go get -d -v go get -d -v
go get -d -v yggdrasil go get -d -v yggdrasil
for file in *.go ; do for file in *.go ; do
echo "Building: $file" echo "Building: $file"
go build $@ $file #go build $@ $file
#go build -ldflags="-s -w" -v $file if [ $DEBUG ]; then
#upx --brute ${file/.go/} go build -tags debug -v $file
else
go build -ldflags="-s -w" -v $file
fi
if [ $UPX ]; then
upx --brute ${file%.go}
fi
done done