From 81a95c2030a5bf2cac7315fa76cf98e35a6eb2a3 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Fri, 1 Dec 2023 18:59:08 +0100 Subject: [PATCH] arc: fix update Signed-off-by: AuxXxilium --- files/initrd/opt/arc/arc.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index bc0f266e..4de29bc7 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -1432,7 +1432,7 @@ function updateMenu() { [ -z "${opts}" ] && return 1 if [ ${opts} -eq 1 ]; then TAG="$(curl --insecure -s https://api.github.com/repos/AuxXxilium/arc/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')" - if [ $? -ne 0 ] || [ -z "${TAG}" ]; then + if [[ $? -ne 0 || -z "${TAG}" ]]; then dialog --backtitle "$(backtitle)" --title "Update Loader" --aspect 18 \ --msgbox "Error checking new version!" 0 0 return 1 @@ -1534,7 +1534,7 @@ function updateMenu() { [ -z "${opts}" ] && return 1 if [ ${opts} -eq 1 ]; then TAG="$(curl --insecure -s https://api.github.com/repos/AuxXxilium/arc-patches/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')" - if [[ $? -ne 0 || ${STATUS} -ne 200 ]]; then + if [[ $? -ne 0 || -z "${TAG}" ]]; then dialog --backtitle "$(backtitle)" --title "Update Patches" --aspect 18 \ --msgbox "Error checking new Version!" 0 0 return 1 @@ -1576,7 +1576,7 @@ function updateMenu() { [ -z "${opts}" ] && return 1 if [ ${opts} -eq 1 ]; then TAG="$(curl --insecure -s https://api.github.com/repos/AuxXxilium/arc-modules/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')" - if [[ $? -ne 0 || ${STATUS} -ne 200 ]]; then + if [[ $? -ne 0 || -z "${TAG}" ]]; then dialog --backtitle "$(backtitle)" --title "Update Modules" --aspect 18 \ --msgbox "Error checking new Version!" 0 0 return 1 @@ -1629,7 +1629,7 @@ function updateMenu() { [ -z "${opts}" ] && return 1 if [ ${opts} -eq 1 ]; then TAG="$(curl --insecure -s https://api.github.com/repos/AuxXxilium/arc-configs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')" - if [[ $? -ne 0 || ${STATUS} -ne 200 ]]; then + if [[ $? -ne 0 || -z "${TAG}" ]]; then dialog --backtitle "$(backtitle)" --title "Update Configs" --aspect 18 \ --msgbox "Error checking new Version!" 0 0 return 1 @@ -1671,7 +1671,7 @@ function updateMenu() { [ -z "${opts}" ] && return 1 if [ ${opts} -eq 1 ]; then TAG="$(curl --insecure -s https://api.github.com/repos/AuxXxilium/redpill-lkm/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')" - if [[ $? -ne 0 || ${STATUS} -ne 200 ]]; then + if [[ $? -ne 0 || -z "${TAG}" ]]; then dialog --backtitle "$(backtitle)" --title "Update LKMs" --aspect 18 \ --msgbox "Error checking new Version!" 0 0 return 1