polish messages
This commit is contained in:
		| @@ -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[@]}" | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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[@]}" | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user