From 16c25d746056ff0b6c18f095190a94c356039253 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 23 Apr 2023 18:28:58 -0500 Subject: [PATCH] Use timestamp for naming logfiles --- build_revanced.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_revanced.sh b/build_revanced.sh index 4b2f06f..21752ef 100755 --- a/build_revanced.sh +++ b/build_revanced.sh @@ -3,13 +3,13 @@ # Run only one instance of this script at one time [ "${BKLOCKER}" != "running" ] && exec env BKLOCKER="running" flock -en "/tmp/revanced-builder.lock" "$0" "$@" || : -# Log everything to a logfile inside logs/ -log_file="$1/logs/$(date '+%s')" -[ -d "$1" ] && mkdir -p "$1/logs" && exec > >(tee "$log_file") 2>&1 - # Get timestamp timestamp=$(date '+%s') +# Log everything to a logfile inside logs/ +log_file="$1/logs/$timestamp" +[ -d "$1" ] && mkdir -p "$1/logs" && exec > >(tee "$log_file") 2>&1 + # Set working directory and current directory if [ -d "$1" ]; then WDIR="$1"