diff options
author | Caleb Bassi <calebjbassi@gmail.com> | 2018-05-10 21:37:54 -0700 |
---|---|---|
committer | Caleb Bassi <calebjbassi@gmail.com> | 2018-05-10 21:37:54 -0700 |
commit | 9b2f006f14d43228bf316f0f5e5ea837589ce560 (patch) | |
tree | a20e5a5dc821954af50b83faff06082cdb334c21 /scripts | |
parent | 943109676feb97ef09e85ee44ba79ea7ddc10e2f (diff) |
Add scripts folder
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/download.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/download.sh b/scripts/download.sh new file mode 100755 index 0000000..be5ccb8 --- /dev/null +++ b/scripts/download.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +VERSION=1.2.15 + +download() { + archive=gotop_${VERSION}_${1}.tgz + curl -LO https://github.com/cjbassi/gotop/releases/download/$VERSION/$archive + tar xf $archive + rm $archive +} + +arch=$(uname -sm) +case "$arch" in + # order matters + Linux\ armv5*) download linux_arm5 ;; + Linux\ armv6*) download linux_arm6 ;; + Linux\ armv7*) download linux_arm7 ;; + Linux\ armv8*) download linux_arm8 ;; + Linux\ aarch64*) download linux_arm8 ;; + Linux\ *64) download linux_amd64 ;; + Linux\ *86) download linux_386 ;; + *) + echo "No binary found for your system" + exit 1 + ;; +esac |