From 04809cfe90b5a05d11d0e37f4eb0b4d81c8b7224 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 20 Apr 2026 15:05:15 +0000 Subject: [PATCH] migrate-seasons.sh: add --cam flag, include Summer in search --cam NAME overrides SUNRISE_CAM so the script can be used for any camera (e.g. north). Summer is now included in the find targets so any ASTRO_YEAR=2025 Summer clips (Summer 2026) are also migrated. https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ --- migrate-seasons.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/migrate-seasons.sh b/migrate-seasons.sh index 8328498..9fef5b2 100755 --- a/migrate-seasons.sh +++ b/migrate-seasons.sh @@ -29,15 +29,19 @@ source "$SCRIPT_DIR/sky-cam.conf" DRY_RUN=false OLD_ROOT="$HOME/drives/local-2tb/movies/sunrise" +CAM="" -for arg in "$@"; do - case "$arg" in - --dry-run) DRY_RUN=true ;; - *) OLD_ROOT="$arg" ;; +while [[ $# -gt 0 ]]; do + case "$1" in + --dry-run) DRY_RUN=true ;; + --cam) shift; CAM="$1" ;; + --cam=*) CAM="${1#--cam=}" ;; + *) OLD_ROOT="$1" ;; esac + shift done -CAM="$SUNRISE_CAM" +[ -z "$CAM" ] && CAM="$SUNRISE_CAM" NEW_ROOT="$MOVIES_DIR/$CAM/2025" echo "Old archive : $OLD_ROOT" @@ -91,6 +95,7 @@ while IFS= read -r -d '' src; do done < <(find \ "$OLD_ROOT/Spring" \ + "$OLD_ROOT/Summer" \ "$OLD_ROOT/Winter" \ "$OLD_ROOT/Autumn" \ -name "*-final.mp4" -print0 2>/dev/null | sort -z) @@ -117,7 +122,7 @@ $DRY_RUN && echo "Re-run without --dry-run to move the files." && echo "" echo "Next steps:" echo " 1. Build montages for completed movements:" -echo " ./montage-mvt.sh 2026-04-19 $CAM # Spring Mvt1" +echo " ./montage-mvt.sh 2026-04-19 $CAM # Spring Mvt1 (today is last day)" echo " ./montage-mvt.sh 2026-01-18 $CAM # Winter Mvt1" echo " ./montage-mvt.sh 2026-02-16 $CAM # Winter Mvt2" echo " ./montage-mvt.sh 2026-03-19 $CAM # Winter Mvt3"