← back to Goldleafwallpaper
scripts/ig-poster/run.sh
11 lines
#!/usr/bin/env bash
# run.sh — launchd entrypoint for the @goldleafwallpaper 4-hour poster.
# launchd starts jobs with a minimal PATH (no Homebrew node) and no env, so we
# restore PATH and source the gitignored .env (which is where the Meta token
# lives once connected). No .env / no token => post-next.js runs in DRY mode.
set -u
export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
[ -f "$HERE/.env" ] && set -a && . "$HERE/.env" && set +a
exec node "$HERE/post-next.js"