recordstoreguy/deploy-games.sh
2026-08-01 20:50:19 +10:00

19 lines
845 B
Bash
Executable File

#!/usr/bin/env bash
# Deploy the FMV games to monsterrobot.games/games/<name>/
# Game dirs are READ-ONLY bind mounts into forum-nginx: rsync to the HOST path.
set -euo pipefail
HOST="humanjing@100.71.119.27"; BASE="/home/humanjing/monsterrobot.games"
HERE="$(cd "$(dirname "$0")" && pwd)"
for g in "$@"; do
case "$g" in
beyondmorpmovie|deepgroove|morpinghorror) SRC="$HERE/games/$g/engine/";;
recordstoreguy) SRC="$HERE/engine/";;
*) echo "unknown game $g"; exit 1;;
esac
echo "== $g"
rsync -az --delete --exclude='.DS_Store' "$SRC" "$HOST:$BASE/games/$g/"
[ -f "$HERE/deploy-assets/$g.jpg" ] && scp -q "$HERE/deploy-assets/$g.jpg" "$HERE/deploy-assets/${g}_riso.jpg" "$HOST:$BASE/covers/"
code=$(curl -s -o /dev/null -w '%{http_code}' "https://monsterrobot.games/games/$g/?cb=$RANDOM")
echo " live: HTTP $code"
done