This commit is contained in:
Heavybullets8 2022-07-26 19:04:27 -06:00
parent e0ba0935b8
commit 05051adf23
2 changed files with 21 additions and 22 deletions

View File

@ -1,25 +1,25 @@
#!/bin/bash #!/bin/bash
menu(){ menu(){
script=$(readlink -f "$0") script=$(readlink -f "$0")
script_path=$(dirname "$script") script_path=$(dirname "$script")
script_name="heavy_script.sh" script_name="heavy_script.sh"
cd "$script_path" || exit cd "$script_path" || exit
clear -x clear -x
title title
echo "1) Help" echo "1) Help"
echo "2) List DNS Names" echo "2) List DNS Names"
echo "3) Mount and Unmount PVC storage" echo "3) Mount and Unmount PVC storage"
echo "4) Create a Backup" echo "4) Create a Backup"
echo "5) Restore a Backup" echo "5) Restore a Backup"
echo "6) Delete a Backup" echo "6) Delete a Backup"
echo "7) Update HeavyScript" echo "7) Update HeavyScript"
echo "8) Update Applications" echo "8) Update Applications"
echo echo
echo "0) Exit" echo "0) Exit"
read -rt 600 -p "Please select an option by number: " selection read -rt 600 -p "Please select an option by number: " selection
case $selection in case $selection in
0) 0)
exit exit
;; ;;
@ -174,7 +174,7 @@ menu(){
*) *)
echo "That was not an option, please try agian" && sleep 5 && menu echo "That was not an option, please try agian" && sleep 5 && menu
;; ;;
esac esac
echo echo
} }
export -f menu export -f menu

View File

@ -35,6 +35,7 @@ done
} }
export -f commander export -f commander
update_apps(){ update_apps(){
app_name=$(echo "${array[$it]}" | awk -F ',' '{print $1}') #print out first catagory, name. 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 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") echo_array+=("\n$app_name\nMajor Release, update manually")
return 0 return 0
fi fi
} }
export -f update_apps export -f update_apps