summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Bassi <calebjbassi@gmail.com>2018-02-19 00:55:31 -0800
committerCaleb Bassi <calebjbassi@gmail.com>2018-02-19 00:55:31 -0800
commit3bf9e6658dd1962ac18153865bad6c8c38b24d9f (patch)
treef56da4a0ba2130c9462bfd851612e06b256f9cf0
parentbbd46343fc7205886356ad826b79eb0c7c25b093 (diff)
Updated install.sh
-rw-r--r--README.md2
-rwxr-xr-xinstall.sh11
2 files changed, 10 insertions, 3 deletions
diff --git a/README.md b/README.md
index 1ef5858..e029436 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ Built with [gopsutil](https://github.com/shirou/gopsutil), [drawille-go](https:/
Go code compiles to a single executable so you just need to somehow get that into your $PATH.
-Either manually download the latest release for your OS from the releases tab and move it into `/bin`, or run this command to do it for you:
+Either manually download the latest release for your OS from the releases tab and move it into `/usr/bin`, or run this command to do it for you:
```
curl https://raw.githubusercontent.com/cjbassi/gotop/master/install.sh | sudo sh
diff --git a/install.sh b/install.sh
index 7ae6233..689f0d7 100755
--- a/install.sh
+++ b/install.sh
@@ -2,5 +2,12 @@
VERSION=v1.0
-curl -L https://github.com/cjbassi/gotop/releases/download/$VERSION/gotop > /usr/bin/gotop
-chmod +x /usr/bin/gotop
+download() {
+ curl -L https://github.com/cjbassi/gotop/releases/download/$VERSION/${1} > /usr/bin/gotop
+ chmod +x /usr/bin/gotop
+}
+
+arch=$(uname -sm)
+case "$arch" in
+ Linux\ *64) download gotop-linux_amd64 ;;
+esac