diff --git a/functions/backup.sh b/functions/backup.sh index 03c0003b..a4eff30b 100644 --- a/functions/backup.sh +++ b/functions/backup.sh @@ -8,7 +8,7 @@ date=$(date '+%Y_%m_%d_%H_%M_%S') [[ -z "$verbose" ]] && echo_backup+=("\nNew Backup Name:") && cli -c 'app kubernetes backup_chart_releases backup_name=''"'HeavyScript_"$date"'"' | tail -n 1 &> /dev/null && echo_backup+=(HeavyScript_"$date") mapfile -t list_backups < <(cli -c 'app kubernetes list_backups' | grep "HeavyScript_" | sort -t '_' -Vr -k2,7 | awk -F '|' '{print $2}'| tr -d " \t\r") if [[ ${#list_backups[@]} -gt "number_of_backups" ]]; then - echo_backup+=("\nDeleting the oldest backup(s) for exceeding limit:") + echo_backup+=("\nDeleted the oldest backup(s) for exceeding limit:") overflow=$(( ${#list_backups[@]} - "$number_of_backups" )) mapfile -t list_overflow < <(cli -c 'app kubernetes list_backups' | grep "HeavyScript_" | sort -t '_' -V -k2,7 | awk -F '|' '{print $2}'| tr -d " \t\r" | head -n "$overflow") for i in "${list_overflow[@]}" diff --git a/functions/menu.sh b/functions/menu.sh index 188bd13e..acb24d7c 100644 --- a/functions/menu.sh +++ b/functions/menu.sh @@ -128,6 +128,8 @@ menu(){ read -rt 600 -p "Please type the number associated with the flag above: " current_selection if [[ $current_selection == 0 ]]; then + clear -x + echo "Running \"bash heavy_script.sh ${update_selection[*]}\"" exec bash "$script_name" "${update_selection[@]}" exit elif [[ $current_selection == 1 ]]; then diff --git a/functions/misc.sh b/functions/misc.sh index 8fcdbbed..e6439e9f 100644 --- a/functions/misc.sh +++ b/functions/misc.sh @@ -2,7 +2,7 @@ sync(){ -echo_sync+=("\nSyncing all catalogs, please wait..") && cli -c 'app catalog sync_all' &> /dev/null && echo_sync+=("Catalog sync complete") +cli -c 'app catalog sync_all' &> /dev/null && echo_sync+=("Catalog sync complete") #Dump the echo_array, ensures all output is in a neat order. for i in "${echo_sync[@]}" diff --git a/heavy_script.sh b/heavy_script.sh index 7dff535c..ce8742ce 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -139,7 +139,10 @@ done [[ "$restore" == "true" ]] && restore && exit [[ "$mount" == "true" ]] && mount && exit if [[ "$number_of_backups" -ge 1 && "$sync" == "true" ]]; then # Run backup and sync at the same time - echo -e "Backing up and syncing catalogs at the same time, please wait for output..\n" + echo "Running the following two tasks at the same time" + echo "------------------------------------------------" + echo -e "Backing up ix-applications dataset\nSyncing catalog(s)" + echo -e "This can take a LONG time, please wait for the output..\n" backup & sync & wait