From 681ca21cd12af8315f32030bf6ced6119a21287b Mon Sep 17 00:00:00 2001 From: tangobravo14 Date: Thu, 7 Mar 2024 14:42:08 +0000 Subject: [PATCH] fixed exit codes --- AmRRON-PAT-GUI.sh | 7 ++++++- AmRRON-Setup-Script.sh | 7 +++++++ AmRRON-TriMode-Setup.sh | 11 ++++++++--- AmRRON-Vara-setup.sh | 7 ++++++- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/AmRRON-PAT-GUI.sh b/AmRRON-PAT-GUI.sh index 839fec9..5a90c22 100755 --- a/AmRRON-PAT-GUI.sh +++ b/AmRRON-PAT-GUI.sh @@ -56,7 +56,12 @@ date, click continue." | yad \ --button="Continue:0" \ --title "Ensure your scripts are up to date." \ ${r} ${c} - +rc=$? + if [[ $rc == 0 ]]; then + echo "Continuing with current version" + elif [[ $rc == 1 ]]; then + exit 1 + fi } function dep_check() { diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index 766639a..a4948b9 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -163,6 +163,13 @@ date, click continue." | yad \ --button="Continue:0" \ --title "Ensure your scripts are up to date." \ ${r} ${c} +rc=$? + if [[ $rc == 0 ]]; then + echo "Continuing with current version" + elif [[ $rc == 1 ]]; then + exit 1 + fi + } diff --git a/AmRRON-TriMode-Setup.sh b/AmRRON-TriMode-Setup.sh index ea3a923..d38d250 100755 --- a/AmRRON-TriMode-Setup.sh +++ b/AmRRON-TriMode-Setup.sh @@ -1,9 +1,9 @@ #!/bin/bash ################################################################################ ################################################################################ - ####################### AmRRON Tri-Mode Setup v0.6.3 ######################### + ####################### AmRRON Tri-Mode Setup v0.7 ######################### ####################### Created by TB-14 ######################### - ####################### 26 Feb 2024 ######################### + ####################### 07 Mar 2024 ######################### ################################################################################ ################################################################################ @@ -44,7 +44,12 @@ date, click continue." | yad \ --button="Continue:0" \ --title "Ensure your scripts are up to date." \ ${r} ${c} - +rc=$? + if [[ $rc == 0 ]]; then + echo "Continuing with current version" + elif [[ $rc == 1 ]]; then + exit 1 + fi } function determine_os() { diff --git a/AmRRON-Vara-setup.sh b/AmRRON-Vara-setup.sh index 7631876..9119f3d 100755 --- a/AmRRON-Vara-setup.sh +++ b/AmRRON-Vara-setup.sh @@ -94,7 +94,12 @@ date, click continue." | yad \ --button="Continue:0" \ --title "Ensure your scripts are up to date." \ ${r} ${c} - +rc=$? + if [[ $rc == 0 ]]; then + echo "Continuing with current version" + elif [[ $rc == 1 ]]; then + exit 1 + fi } # Create a error function to make life easier later on