Files
sky-cam/bootstrap.sh
T
Claude a1cf1304e4 Fix first-run blockers: MOVIES_DIR path, CAM_NAME, .env for Python, eval safety
daily_sunrise_video.sh: use \$MOVIES_DIR instead of \$BASE_DIR/movies so the
override in sky-cam.conf is respected when videos live on a separate drive.

capture.sh: default camera name falls back to \$SUNRISE_CAM (not the
undefined \$CAM_NAME) when no argument is passed.

sunrise2mm.py: also loads .env after sky-cam.conf so Mattermost credentials
moved to .env are actually visible to the upload script.

sunrise.py: raise a clear error message when LATITUDE/LONGITUDE/TIMEZONE
are missing from sky-cam.conf instead of an opaque KeyError.

4-seasons.sh, montage-mvt.sh: capture season_info.py output before eval so
a Python failure exits cleanly with a diagnostic message rather than
silently continuing with undefined variables.

bootstrap.sh: add system package install step (ffmpeg bc fonts-dejavu) and
show the .env setup step after install.sh generates .env.example.

README.md: correct Python package names and add fonts-dejavu dependency.

https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
2026-04-19 23:37:10 +00:00

39 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# bootstrap.sh — download and unpack sky-cam from GitHub.
#
# Usage:
# bash bootstrap.sh [TARGET_DIR]
#
# Downloads the latest sky-cam from GitHub into TARGET_DIR (default: ./sky-cam),
# then tells you what to do next.
set -euo pipefail
TARGET="${1:-sky-cam}"
REPO="outis1one/sky-cam"
BRANCH="main"
URL="https://github.com/$REPO/archive/refs/heads/$BRANCH.tar.gz"
echo "Downloading sky-cam from GitHub..."
curl -fL "$URL" | tar xz
mv "sky-cam-$BRANCH" "$TARGET"
echo ""
echo "Done. Next steps:"
echo " 1. Install system packages (if not already present):"
echo " sudo apt install ffmpeg bc fonts-dejavu"
echo " pip3 install suntime pytz requests"
echo ""
echo " 2. Edit $TARGET/sky-cam.conf"
echo " — SCRIPT_DIR full path to the directory you'll run scripts from"
echo " — BASE_DIR where your camera images live"
echo " — MUSIC_DIR path to your Vivaldi Four Seasons audio files"
echo " — CAMERAS list of camera names, e.g. (sunrise)"
echo " — SUNRISE_CAM which camera faces east (gets the sunrise video job)"
echo " — LATITUDE / LONGITUDE / TIMEZONE your location"
echo ""
echo " 3. cd $TARGET && ./install.sh"
echo " This generates .env.example — copy it to .env and add credentials:"
echo " cp $TARGET/.env.example $TARGET/.env"
echo " \$EDITOR $TARGET/.env"