diff --git a/README.md b/README.md index fc88c55..dba0d19 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Binaries are currently available for 32/64bit Linux and 64bit OSX. To download the latest binary for your system from GitHub, you can run the [download](https://github.com/cjbassi/gotop/blob/master/download.sh) script: ``` -curl https://raw.githubusercontent.com/cjbassi/gotop/master/download.sh | bash +sh -c "$(curl https://raw.githubusercontent.com/cjbassi/gotop/master/download.sh)" ``` Then move `gotop` into your $PATH somewhere. diff --git a/download.sh b/download.sh index f830e9f..c4d3256 100755 --- a/download.sh +++ b/download.sh @@ -2,7 +2,7 @@ VERSION=1.0.1 -install() { +download() { curl -L https://github.com/cjbassi/gotop/releases/download/$VERSION/gotop-$VERSION-${1}.tgz > gotop.tgz tar xf gotop.tgz rm gotop.tgz @@ -10,9 +10,9 @@ install() { arch=$(uname -sm) case "$arch" in - Linux\ *64) install linux_amd64 ;; - Linux\ *86) install linux_386 ;; - Darwin\ *64) install darwin_amd64 ;; + Linux\ *64) download linux_amd64 ;; + Linux\ *86) download linux_386 ;; + Darwin\ *64) download darwin_amd64 ;; *) echo "No binary found for your system" exit 1