mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-25 02:55:26 +00:00
Update build script to strip by default, allow debug -d and UPX -u flags
This commit is contained in:
parent
10a66a4edc
commit
2c3074a979
20
build
20
build
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user