Require camera name explicitly across all seasons scripts
No script defaults to SUNRISE_CAM (east) for the seasons pipeline. Every direction is treated equally — camera name is a required arg, not an optional override. - 4-seasons.sh: $1 required, exits with usage if missing - montage-mvt.sh: arg order changed to <cam> [date]; $1 required - year-end-join.sh: $2 (cam) required - verify-mvt.sh: $4 (cam) required - migrate-seasons.sh: example commands updated to new arg order - README.md: montage-mvt.sh examples updated https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
+8
-3
@@ -13,8 +13,13 @@ SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
||||
source "$SCRIPT_DIR/sky-cam.conf"
|
||||
export TIMEZONE # make it visible to season_info.py subprocess
|
||||
|
||||
# Camera name: first argument overrides conf (systemd passes it via ExecStart).
|
||||
CAM_NAME="${1:-$SUNRISE_CAM}"
|
||||
# Camera name: required first argument (systemd passes it via ExecStart).
|
||||
CAM_NAME="${1:-}"
|
||||
if [ -z "$CAM_NAME" ]; then
|
||||
echo "Usage: $0 <camera-name>"
|
||||
echo " e.g. $0 east or $0 north"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ── Configuration ──────────────────────────────────────────────────────────────
|
||||
base_dir="$BASE_DIR"
|
||||
@@ -125,5 +130,5 @@ if [ "$IS_LAST_DAY" = "true" ]; then
|
||||
echo "Last day of $SEASON Mvt $MVT_NUM — triggering montage compilation..."
|
||||
# Pass $yesterday so montage-mvt.sh looks up the correct movement
|
||||
# (running the next morning, "today" would already be the next movement).
|
||||
"$SCRIPT_DIR/montage-mvt.sh" "$yesterday" "$CAM_NAME"
|
||||
"$SCRIPT_DIR/montage-mvt.sh" "$CAM_NAME" "$yesterday"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user