Skip to content

Commit

Permalink
build.sh: tweak logging to create a timestamped update.sh log
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jan 30, 2025
1 parent c550a2b commit 1352fd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ progress() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] update.sh: $*"
}

LOGFILE="logs/update-latest.log"
LOG_TIMESTAMP="$(date '+%Y-%m-%d-%H:%M:%S')"
LOGFILE="logs/update-$LOG_TIMESTAMP.log"
progress "update.sh starting (see $LOGFILE)"

test -n "$FORCEBUILD" || {
Expand Down Expand Up @@ -155,7 +156,7 @@ SCRIPT_TIME=$(echo "($END_BUILD_WIKI - $START)/60" | bc)
progress "Time to run the full script: $SCRIPT_TIME minutes"


) >$LOGFILE 2>&1 || {
) 2>&1 | tee logs/update-latest.log >$LOGFILE || {
progress "update.sh failed; see $LOGFILE"
}

Expand Down

0 comments on commit 1352fd7

Please sign in to comment.