Skip to content

Commit

Permalink
Update upx.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
cxjava committed Oct 16, 2019
1 parent 18c7819 commit 91d589c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions upx.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#!/bin/bash
set -ex
upx dist/*/AriaNg-go*

set -euo pipefail

case "$(uname -s)" in
"Darwin") brew install upx ;;
"Linux") curl -sL https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz | tar xv -C "$GOPATH/bin" --strip-components=1 upx-3.95-amd64_linux/upx ;;
*) echo "Sorry no support your OS yet" && exit 1 ;;
esac

find dist/ -type f -iname AriaNg-go | xargs -I{} -n1 -P 4 upx --best "{}"

0 comments on commit 91d589c

Please sign in to comment.