From 87b31b845dd25a8a40b45672accac1b3d28adcf6 Mon Sep 17 00:00:00 2001 From: ReachableCEO Date: Mon, 30 Jun 2025 12:18:15 -0500 Subject: [PATCH] log file testing.. --- SetupNewSystem.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SetupNewSystem.sh b/SetupNewSystem.sh index 139192d..feb8a41 100644 --- a/SetupNewSystem.sh +++ b/SetupNewSystem.sh @@ -1,5 +1,11 @@ #!/usr/bin/bash +export CURRENT_TIMESTAMP +CURRENT_TIMESTAMP="$(date +%A-%Y-%m-%d-%T)" + +export LOGFILENAME +LOGFILENAME="$0.${CURRENT_TIMESTAMP}.$$" + # Standard strict mode and error handling boilderplate... set -o errexit @@ -15,6 +21,7 @@ function print_info() NC='\033[0m' tput bold echo -e "$GREEN $1${NC}" + echo "$GREEN $1${NC}" >> "$LOGFILENAME" tput sgr0 } @@ -25,6 +32,7 @@ function print_error() tput bold echo -e "$RED $1${NC}" echo "$1" + echo "$RED $1${NC}" >> "$LOGFILENAME" tput sgr0 }