← back to Letsbegin

run-last20-fullmonty.sh

10 lines

#!/usr/bin/env bash
# pm2 wrapper for the last-20-day Full Monty backfill.
# Pulls ONLY the two needed keys (avoids a zsh parse error on a malformed line in the .env),
# then execs node. pm2 starts THIS script.
set -euo pipefail
SECRETS=/Users/macstudio3/Projects/secrets-manager/.env
export SHOPIFY_ADMIN_TOKEN="$(grep -m1 '^SHOPIFY_ADMIN_TOKEN=' "$SECRETS" | cut -d= -f2-)"
export GEMINI_API_KEY="$(grep -m1 '^GEMINI_API_KEY=' "$SECRETS" | cut -d= -f2-)"
exec node /Users/macstudio3/Projects/Letsbegin/last20day_full_monty.js "$@"