Skip to content
Snippets Groups Projects
Unverified Commit 5a71bfd5 authored by Max Adamo's avatar Max Adamo
Browse files

ask to run upx

parent 58bcfb8a
No related branches found
No related tags found
No related merge requests found
...@@ -17,11 +17,21 @@ BUILDTIME=$(date -u '+%Y-%m-%d_%H:%M:%S') ...@@ -17,11 +17,21 @@ BUILDTIME=$(date -u '+%Y-%m-%d_%H:%M:%S')
rm -rf ${GOPATH}/src/github.com/maxadamo/${BIN_NAME} rm -rf ${GOPATH}/src/github.com/maxadamo/${BIN_NAME}
#go get -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" gitlab.geant.net/devops/${BIN_NAME} #go get -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" gitlab.geant.net/devops/${BIN_NAME}
go get -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" . go get -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" .
# upx --brute ${GOPATH}/bin/${BIN_NAME} while true; do
read -p "Do you wish to run upx against ${BIN_NAME}?" yn
case $yn in
[Yy]*)
upx --brute ${GOPATH}/bin/${BIN_NAME}
break
;;
[Nn]*) exit ;;
*) echo "Please answer yes or no." ;;
esac
done
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
echo -e "\nthere was an error while compiling the code\n" echo -e "\nthere was an error while compiling the code\n"
exit exit
fi fi
echo -e "\nthe binary was compiled and it is avilable as:\n - ${GOPATH}/bin/${BIN_NAME}\n" echo -e "\nthe binary was compiled and it is avilable as:\n - ${GOPATH}/bin/${BIN_NAME}\n"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment