From 53520f89fd2bb0a926ff882d9b71b7747e7e76a5 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Wed, 4 Sep 2024 19:43:15 +0200 Subject: [PATCH] arc: fix logic in update menu Signed-off-by: AuxXxilium --- files/initrd/opt/arc/arc-functions.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/files/initrd/opt/arc/arc-functions.sh b/files/initrd/opt/arc/arc-functions.sh index 4a0b42c7..dcf306dc 100755 --- a/files/initrd/opt/arc/arc-functions.sh +++ b/files/initrd/opt/arc/arc-functions.sh @@ -880,7 +880,7 @@ function updateMenu() { 1 "Latest ${NEWVER}" \ 2 "Select Version" \ 2>"${TMP_PATH}/opts" - [ $? -ne 0 ] && continue + [ $? -ne 0 ] && break opts=$(cat ${TMP_PATH}/opts) if [ ${opts} -eq 1 ]; then TAG="" @@ -907,7 +907,7 @@ function updateMenu() { 1 "Latest ${NEWVER}" \ 2 "Select Version" \ 2>"${TMP_PATH}/opts" - [ $? -ne 0 ] && continue + [ $? -ne 0 ] && break opts=$(cat ${TMP_PATH}/opts) if [ ${opts} -eq 1 ]; then TAG="" @@ -946,7 +946,7 @@ function updateMenu() { 1 "Latest ${NEWVER}" \ 2 "Select Version" \ 2>"${TMP_PATH}/opts" - [ $? -ne 0 ] && continue + [ $? -ne 0 ] && break opts=$(cat ${TMP_PATH}/opts) if [ ${opts} -eq 1 ]; then TAG="" @@ -972,6 +972,7 @@ function updateMenu() { 1 "Latest ${NEWVER}" \ 2 "Select Version" \ 2>"${TMP_PATH}/opts" + [ $? -ne 0 ] && break opts=$(cat ${TMP_PATH}/opts) if [ ${opts} -eq 1 ]; then TAG="" @@ -1001,6 +1002,7 @@ function updateMenu() { 1 "Latest ${NEWVER}" \ 2 "Select Version" \ 2>"${TMP_PATH}/opts" + [ $? -ne 0 ] && break opts=$(cat ${TMP_PATH}/opts) if [ ${opts} -eq 1 ]; then TAG="" @@ -1026,6 +1028,7 @@ function updateMenu() { 1 "Latest ${NEWVER}" \ 2 "Select Version" \ 2>"${TMP_PATH}/opts" + [ $? -ne 0 ] && break opts=$(cat ${TMP_PATH}/opts) if [ ${opts} -eq 1 ]; then TAG="" @@ -1051,6 +1054,7 @@ function updateMenu() { 1 "Latest ${NEWVER}" \ 2 "Select Version" \ 2>"${TMP_PATH}/opts" + [ $? -ne 0 ] && break opts=$(cat ${TMP_PATH}/opts) if [ ${opts} -eq 1 ]; then TAG="" @@ -1076,6 +1080,7 @@ function updateMenu() { 1 "Latest ${NEWVER}" \ 2 "Select Version" \ 2>"${TMP_PATH}/opts" + [ $? -ne 0 ] && break opts=$(cat ${TMP_PATH}/opts) if [ ${opts} -eq 1 ]; then TAG="" @@ -1099,6 +1104,7 @@ function updateMenu() { 1 "Stable Buildroot" \ 2 "Next Buildroot (latest)" \ 2>"${TMP_PATH}/opts" + [ $? -ne 0 ] && break opts=$(cat ${TMP_PATH}/opts) if [ ${opts} -eq 1 ]; then writeConfigKey "arc.branch" "stable" "${USER_CONFIG_FILE}"