new spacing

This commit is contained in:
Heavybullets8 2022-07-31 12:56:50 -06:00
parent c6e89cf356
commit 41e2b9f9ff
4 changed files with 10 additions and 6 deletions

View File

@ -2,7 +2,7 @@
backup(){ backup(){
echo_backup+=("\n🄱 🄰 🄲 🄺 🅄 🄿 🅂") echo_backup+=("🄱 🄰 🄲 🄺 🅄 🄿 🅂")
echo_backup+=("Number of backups was set to $number_of_backups") echo_backup+=("Number of backups was set to $number_of_backups")
date=$(date '+%Y_%m_%d_%H_%M_%S') date=$(date '+%Y_%m_%d_%H_%M_%S')
[[ "$verbose" == "true" ]] && cli -c 'app kubernetes backup_chart_releases backup_name=''"'HeavyScript_"$date"'"' &> /dev/null && echo_backup+=(HeavyScript_"$date") [[ "$verbose" == "true" ]] && cli -c 'app kubernetes backup_chart_releases backup_name=''"'HeavyScript_"$date"'"' &> /dev/null && echo_backup+=(HeavyScript_"$date")
@ -24,6 +24,8 @@ for i in "${echo_backup[@]}"
do do
echo -e "$i" echo -e "$i"
done done
echo
echo
} }
export -f backup export -f backup

View File

@ -2,7 +2,7 @@
sync(){ sync(){
echo_sync+=("\n\n🅂 🅈 🄽 🄲") echo_sync+=("🅂 🅈 🄽 🄲")
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. #Dump the echo_array, ensures all output is in a neat order.
@ -10,6 +10,8 @@ for i in "${echo_sync[@]}"
do do
echo -e "$i" echo -e "$i"
done done
echo
echo
} }
export -f sync export -f sync

View File

@ -15,14 +15,14 @@ if git diff --name-only origin/main | grep -qs ".sh" ; then
[[ "$i" == "--self-update" ]] && unset "args[$count]" && break [[ "$i" == "--self-update" ]] && unset "args[$count]" && break
((count++)) ((count++))
done done
[[ -z ${args[*]} ]] && echo -e "No more arguments, exiting..\n" && exit [[ -z ${args[*]} ]] && echo -e "No more arguments, exiting..\n\n" && exit
echo -e "Running the new version...\n" echo -e "Running the new version...\n\n"
sleep 5 sleep 5
exec bash "$script_name" "${args[@]}" exec bash "$script_name" "${args[@]}"
# Now exit this old instance # Now exit this old instance
exit exit
else else
echo -e "HeavyScript is already the latest version\n" echo -e "HeavyScript is already the latest version\n\n"
fi fi
} }
export -f self_update export -f self_update

View File

@ -148,7 +148,7 @@ done
if [[ "$backup" == "true" && "$sync" == "true" ]]; then # Run backup and sync at the same time if [[ "$backup" == "true" && "$sync" == "true" ]]; then # Run backup and sync at the same time
echo "🅃 🄰 🅂 🄺 🅂 :" echo "🅃 🄰 🅂 🄺 🅂 :"
echo -e "-Backing up ix-applications dataset\n-Syncing catalog(s)" echo -e "-Backing up ix-applications dataset\n-Syncing catalog(s)"
echo -e "This can take a LONG time, please wait for both output..\n" echo -e "This can take a LONG time, please wait for both output..\n\n"
backup & backup &
sync & sync &
wait wait