changes - hope they work

This commit is contained in:
2026-03-14 11:13:56 +01:00
parent 867124d2fd
commit 335aa54621
5 changed files with 171 additions and 46 deletions

View File

@ -74,6 +74,16 @@ if [[ -n "$PRE_WORKDIR" ]]; then
cd "$PRE_WORKDIR" 2>/dev/null || { echo "Error: WORKDIR '$PRE_WORKDIR' not accessible" >&2; exit 1; }
fi
# --- Logging setup (per-day log file)
LOG_BASE="${LOGDIR:-"$HOME/log/wcs-match"}"
mkdir -p "$LOG_BASE"
LOG_FILE="$LOG_BASE/log.$(date +%Y-%m-%d).txt"
# Append all subsequent output to the log file
exec >>"$LOG_FILE" 2>&1
START_EPOCH=$(date +%s)
echo "=== wcs-frame-match start $(date -Iseconds) (PWD=$(pwd)) ==="
# ---- Arg parsing
REF_IMAGE=""
USER_SET_THRESHOLD="false"
@ -420,3 +430,7 @@ fi
for f in "${FILES[@]}"; do
process_file "$f"
done
END_EPOCH=$(date +%s)
ELAPSED=$((END_EPOCH - START_EPOCH))
echo "=== wcs-frame-match end $(date -Iseconds) (elapsed ${ELAPSED}s) ==="