diff --git a/functions/menu.sh b/functions/menu.sh index 75618d27..e965ed7b 100644 --- a/functions/menu.sh +++ b/functions/menu.sh @@ -1,25 +1,25 @@ #!/bin/bash menu(){ - script=$(readlink -f "$0") - script_path=$(dirname "$script") - script_name="heavy_script.sh" - cd "$script_path" || exit - clear -x - title - echo "1) Help" - echo "2) List DNS Names" - echo "3) Mount and Unmount PVC storage" - echo "4) Create a Backup" - echo "5) Restore a Backup" - echo "6) Delete a Backup" - echo "7) Update HeavyScript" - echo "8) Update Applications" - echo - echo "0) Exit" - read -rt 600 -p "Please select an option by number: " selection +script=$(readlink -f "$0") +script_path=$(dirname "$script") +script_name="heavy_script.sh" +cd "$script_path" || exit +clear -x +title +echo "1) Help" +echo "2) List DNS Names" +echo "3) Mount and Unmount PVC storage" +echo "4) Create a Backup" +echo "5) Restore a Backup" +echo "6) Delete a Backup" +echo "7) Update HeavyScript" +echo "8) Update Applications" +echo +echo "0) Exit" +read -rt 600 -p "Please select an option by number: " selection - case $selection in +case $selection in 0) exit ;; @@ -174,7 +174,7 @@ menu(){ *) echo "That was not an option, please try agian" && sleep 5 && menu ;; - esac - echo +esac +echo } export -f menu \ No newline at end of file diff --git a/functions/update_apps.sh b/functions/update_apps.sh index d1abed7e..92aeab24 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -35,6 +35,7 @@ done } export -f commander + update_apps(){ app_name=$(echo "${array[$it]}" | awk -F ',' '{print $1}') #print out first catagory, name. printf '%s\0' "${ignore[@]}" | grep -iFxqz "${app_name}" && echo -e "\n$app_name\nIgnored, skipping" && return 0 #If application is on ignore list, skip @@ -86,8 +87,6 @@ rollback_version=$(echo "${array[$it]}" | awk -F ',' '{print $4}' | awk -F '_' ' echo_array+=("\n$app_name\nMajor Release, update manually") return 0 fi - - } export -f update_apps