summaryrefslogtreecommitdiffstats
path: root/download.sh
blob: f830e9fded30d2ccdb5e795e1a602c7b4c42c5bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

VERSION=1.0.1

install() {
    curl -L https://github.com/cjbassi/gotop/releases/download/$VERSION/gotop-$VERSION-${1}.tgz > gotop.tgz
    tar xf gotop.tgz
    rm gotop.tgz
}

arch=$(uname -sm)
case "$arch" in
    Linux\ *64)  install linux_amd64    ;;
    Linux\ *86)  install linux_386      ;;
    Darwin\ *64) install darwin_amd64   ;;
    *)
        echo "No binary found for your system"
        exit 1
        ;;
esac