aboutsummaryrefslogtreecommitdiff
path: root/build/upx
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-10-29 21:53:53 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-10-29 21:53:53 -0400
commit5b25c5155312f626813e0d36b7933f5eba801dd2 (patch)
tree6e264a92dbe13ed77821a5c5bd536b6701768442 /build/upx
parente9b933ea6ce85f5d4f4653b7e5e6a7c836fcc893 (diff)
downloaddotfiles-5b25c5155312f626813e0d36b7933f5eba801dd2.tar.gz
dotfiles-5b25c5155312f626813e0d36b7933f5eba801dd2.tar.xz
Major dotfile cleanup
Diffstat (limited to 'build/upx')
-rwxr-xr-xbuild/upx26
1 files changed, 26 insertions, 0 deletions
diff --git a/build/upx b/build/upx
new file mode 100755
index 0000000..9658832
--- /dev/null
+++ b/build/upx
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+set -x
+relver="3.96"
+build_dir="/v/autobuild/jq"
+
+if ! [ -d "$build_dir" ] ; then
+ mkdir -p "$build_dir"
+fi
+cd "$build_dir"
+
+arLoc="https://github.com/upx/upx/releases/download/v%s/upx-%s-amd64_linux.tar.xz"
+arLoc="$(printf "$arLoc\n" "$relver" "$relver")"
+arFn="upx-${relver}-amd64_linux.tar.xz"
+
+checksum=ac75f5172c1c530d1b5ce7215ca9e94586c07b675a26af3b97f8421b8b8d413d
+
+if ! [ -e "$arFn" ] ; then
+ curl -L -o "$arFn" "$arLoc"
+fi
+
+echo "${checksum} $arFn" | sha256sum -c
+
+tar xJvf "$arFn"
+cd "upx-${relver}-amd64_linux"
+cp upx "$HOME/bin/upx"