From bafe71842d333633b8a6bab417bbd71314bc1f09 Mon Sep 17 00:00:00 2001 From: Nico Allers Date: Wed, 15 Nov 2017 14:06:34 +0100 Subject: [PATCH] fixed sub menu option zero --- ARKcommander.sh | 29 ++++++++++++++++++----------- DARKcommander.sh | 29 ++++++++++++++++++----------- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/ARKcommander.sh b/ARKcommander.sh index 5dd98e7..7c4c958 100644 --- a/ARKcommander.sh +++ b/ARKcommander.sh @@ -1069,7 +1069,6 @@ do read_sub_options done -sub_menu ##turn #pause } @@ -1271,7 +1270,7 @@ read_sub_options(){ 5) subfive ;; 6) subsix ;; 7) seven ;; - 0) break ;; + 0) init ;; *) echo -e "$(red " Incorrect option!")" && sleep 1 esac } @@ -1359,15 +1358,23 @@ sudo updatedb proc_vars #exit +init() { + # ---------------------------------------------- + # Menu infinite loop + # ---------------------------------------------- + + while true + do + asciiart + # HERE COMES THE GITHUB CHECK + git_upd_check + show_menus + read_options + done +} + # ---------------------------------------------- -# Menu infinite loop +# Init Application # ---------------------------------------------- -while true -do - asciiart -# HERE COMES THE GITHUB CHECK - git_upd_check - show_menus - read_options -done +init diff --git a/DARKcommander.sh b/DARKcommander.sh index 1f70918..e177a32 100644 --- a/DARKcommander.sh +++ b/DARKcommander.sh @@ -1069,7 +1069,6 @@ do read_sub_options done -sub_menu ##turn #pause } @@ -1271,7 +1270,7 @@ read_sub_options(){ 5) subfive ;; 6) subsix ;; 7) seven ;; - 0) break ;; + 0) init ;; *) echo -e "$(red " Incorrect option!")" && sleep 1 esac } @@ -1359,15 +1358,23 @@ sudo updatedb proc_vars #exit +init() { + # ---------------------------------------------- + # Menu infinite loop + # ---------------------------------------------- + + while true + do + asciiart + # HERE COMES THE GITHUB CHECK + git_upd_check + show_menus + read_options + done +} + # ---------------------------------------------- -# Menu infinite loop +# Init Application # ---------------------------------------------- -while true -do - asciiart -# HERE COMES THE GITHUB CHECK - git_upd_check - show_menus - read_options -done +init \ No newline at end of file