From f741e8f9c5b017f94b92da47c2f772381db52b44 Mon Sep 17 00:00:00 2001 From: Viet Hung Nguyen Date: Sun, 22 Mar 2020 17:29:51 +0700 Subject: [PATCH] Fix error when get version using Wget GitHub now returns lowercase: wget -SqO /dev/null https://github.com/rancher/k3s/releases/latest |& grep -i location location: https://github.com/rancher/k3s/releases/tag/v1.17.3+k3s1 --- install.sh | 2 +- package/rpm/install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index dd30ac6ce8..7e9aa0847c 100755 --- a/install.sh +++ b/install.sh @@ -307,7 +307,7 @@ get_release_version() { VERSION_K3S=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||') ;; wget) - VERSION_K3S=$(wget -SqO /dev/null ${GITHUB_URL}/latest 2>&1 | grep Location | sed -e 's|.*/||') + VERSION_K3S=$(wget -SqO /dev/null ${GITHUB_URL}/latest 2>&1 | grep -i Location | sed -e 's|.*/||') ;; *) fatal "Incorrect downloader executable '$DOWNLOADER'" diff --git a/package/rpm/install.sh b/package/rpm/install.sh index 5d418ed66b..ba9ec5345c 100755 --- a/package/rpm/install.sh +++ b/package/rpm/install.sh @@ -354,7 +354,7 @@ get_release_version() { VERSION_K3S=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||') ;; wget) - VERSION_K3S=$(wget -SqO /dev/null ${GITHUB_URL}/latest 2>&1 | grep Location | sed -e 's|.*/||') + VERSION_K3S=$(wget -SqO /dev/null ${GITHUB_URL}/latest 2>&1 | grep -i Location | sed -e 's|.*/||') ;; *) fatal "Incorrect downloader executable '$DOWNLOADER'"