From 74f3f1ec2c98e08332cff8e141604a75ceaeacbc Mon Sep 17 00:00:00 2001 From: RubberJones <5031378+RubberJones@users.noreply.github.com> Date: Wed, 25 Jun 2025 23:37:41 +0200 Subject: refactor(copy.sh): Remove duplicate print_color function --- copy.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/copy.sh b/copy.sh index 0c556ddd..b405a777 100755 --- a/copy.sh +++ b/copy.sh @@ -75,11 +75,6 @@ if [ ! -d Copy-Logs ]; then mkdir Copy-Logs fi -# Function to print colorful text -print_color() { - printf "%b%s%b\n" "$1" "$2" "$CLEAR" -} - # Set the name of the log file to include the current date and time LOG="Copy-Logs/install-$(date +%d-%H%M%S)_dotfiles.log" -- cgit v1.2.3 From 9c4c63d3e0b49ba94e8166603717ae055a7d6f12 Mon Sep 17 00:00:00 2001 From: RubberJones <5031378+RubberJones@users.noreply.github.com> Date: Wed, 25 Jun 2025 23:46:18 +0200 Subject: fix(copy.sh): Correct variable for resetting color in function Replace the undefined variable $CLEAR with the correct variable $RESET. The function attempted to reset the text color using the $CLEAR variable, which, however, was not defined anywhere in the script. This resulted in the color output not being reset after the function call. This change ensures that the correct, already defined $RESET variable is used to reset the terminal to its default state. --- copy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copy.sh b/copy.sh index b405a777..88b42abf 100755 --- a/copy.sh +++ b/copy.sh @@ -33,7 +33,7 @@ fi # Function to print colorful text print_color() { - printf "%b%s%b\n" "$1" "$2" "$CLEAR" + printf "%b%s%b\n" "$1" "$2" "$RESET" } # Check /etc/os-release to see if this is an Ubuntu or Debian based distro -- cgit v1.2.3