From eb05d9533c79e7df47c51dca71dab7aa253eeb72 Mon Sep 17 00:00:00 2001 From: Dj Walker-Morgan Date: Mon, 10 Aug 2020 13:19:49 +0100 Subject: [PATCH] Fixed/current install.sh --- installers/install.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) mode change 100755 => 100644 installers/install.sh diff --git a/installers/install.sh b/installers/install.sh old mode 100755 new mode 100644 index 1d57879594..a06c12c742 --- a/installers/install.sh +++ b/installers/install.sh @@ -20,7 +20,7 @@ esac if [ $# -eq 0 ]; then flyctl_asset_path=$( - curl -sSf https://github.com/superfly/flyctl/releases | + curl -sSf -N https://github.com/superfly/flyctl/releases | grep -E -o "/superfly/flyctl/releases/download/.*/flyctl_[0-9]+\\.[0-9]+\\.[0-9]+_${target}.tar.gz" | head -n 1 ) @@ -30,9 +30,9 @@ if [ $# -eq 0 ]; then fi flyctl_uri="https://github.com${flyctl_asset_path}" else - if [[ ${1} == "prerel" ]]; then + if [ "${1}" = "prerel" ]; then flyctl_asset_path=$( - curl -sSf https://github.com/superfly/flyctl/releases | + curl -sSf -N https://github.com/superfly/flyctl/releases | grep -E -o "/superfly/flyctl/releases/download/.*/flyctl_[0-9]+\\.[0-9]+\\.[0-9]+(\\-beta\\-[0-9]+)*_${target}.tar.gz" | head -n 1 ) @@ -62,12 +62,6 @@ tar xzf "$exe.tar.gz" chmod +x "$exe" rm "$exe.tar.gz" -if [[ ${1} == "prerel" ]]; then - "$exe" version -s "shell-prerel" -else - "$exe" version -s "shell" -fi - echo "Flyctl was installed successfully to $exe" if command -v flyctl >/dev/null; then echo "Run 'flyctl --help' to get started"