From fce0617eb11c5d6b020283f61f4f5a1a2d8bce63 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 29 Mar 2024 10:11:55 +0000 Subject: [PATCH] color --- backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index 79cfc4c..2877a1d 100644 --- a/backup.sh +++ b/backup.sh @@ -16,10 +16,10 @@ tail -n0 --pid="$$" -f "$dst/next.log" & # Loop until rsync is successful or the user decides to abort while :; do if rsync "${args[@]}" -av --link-dest="$dst/current" "$src/" "$dst/next" 2>&1 >> "$dst/next.log"; then - echo "Backup successful." + echo -e "\033[32mBackup successful.\033[0m" # Green color for success break else - echo "Backup failed." + echo -e "\033[31mBackup failed.\033[0m" # Red color for error # Ask the user for the next step echo "Do you want to retry, abort, or continue? [r/a/c]" read -r response