From 7323083605260b26ee45248865e8f46d631512b8 Mon Sep 17 00:00:00 2001 From: nicedevil007 <17103076+nicedevil007@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:59:21 +0100 Subject: [PATCH] New Menu --- ct/alpine-docker.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index da203c0c..cf15dc2d 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -51,17 +51,23 @@ function default_settings() { echo_default } -function update_script() { - UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ - "1" "Check for Docker Updates" ON \ - 3>&1 1>&2 2>&3) - - header_info - if [ "$UPD" == "1" ]; then - apk update && apk upgrade - exit +while true; do + CHOICE=$(whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \ + "1" "Check for Docker Updates" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ] ; then + clear + exit-script fi -} + header_info + case $CHOICE in + 1 ) + apk update && apk upgrade + exit + ;; + esac +done start build_container