[object Object]

← back to Games Agentabrams

Arcade: sync.sh + sources.tsv — reconcile standalone source builds into the hub

b8cd4c8dbbb84c1c2d10adc8598cf50b3167c7c7 · 2026-07-25 00:07:00 -0700 · Steve

Files touched

Diff

commit b8cd4c8dbbb84c1c2d10adc8598cf50b3167c7c7
Author: Steve <steve@designerwallcoverings.com>
Date:   Sat Jul 25 00:07:00 2026 -0700

    Arcade: sync.sh + sources.tsv — reconcile standalone source builds into the hub
---
 sources.tsv |  6 ++++++
 sync.sh     | 26 ++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/sources.tsv b/sources.tsv
new file mode 100644
index 0000000..038b78b
--- /dev/null
+++ b/sources.tsv
@@ -0,0 +1,6 @@
+# <hub-id>	<abs-source-project-path>
+particle-text-starling	/Users/macstudio3/Projects/particle-text
+emoji-memory	/Users/macstudio3/Projects/emoji-agentabrams
+flappy-clone	/Users/macstudio3/Projects/flappy-clone
+flappy-flight	/Users/macstudio3/Projects/flappy-flight
+flappy-sky	/Users/macstudio3/Projects/flappy-sky
diff --git a/sync.sh b/sync.sh
new file mode 100755
index 0000000..d3364d9
--- /dev/null
+++ b/sync.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+# Reconcile standalone source builds -> this topic hub (games/<id>/).
+# Mapping lives in sources.tsv: "<hub-id>\t<abs-source-project-path>".
+# Usage: ./sync.sh [--commit]
+set -euo pipefail
+HUB="$(cd "$(dirname "$0")" && pwd)"
+MAP="$HUB/sources.tsv"
+[ -f "$MAP" ] || { echo "no sources.tsv"; exit 0; }
+changed=0
+while IFS=$'\t' read -r id src; do
+  [ -z "${id:-}" ] && continue
+  case "$id" in \#*) continue;; esac
+  src="${src/#\~/$HOME}"
+  dest="$HUB/games/$id"
+  if [ ! -d "$src" ]; then echo "! source missing for $id: $src"; continue; fi
+  mkdir -p "$dest"
+  if ! cmp -s "$src/index.html" "$dest/index.html" 2>/dev/null; then
+    cp "$src/index.html" "$dest/index.html"; echo "synced index.html -> games/$id/"; changed=1
+  fi
+  for aa in "$src"/*.aa; do [ -e "$aa" ] || continue; cp "$aa" "$dest/"; done
+done < "$MAP"
+[ "$changed" = 1 ] && echo "sync: updates applied" || echo "sync: all in sync"
+if [ "${1:-}" = "--commit" ] && [ -n "$(git -C "$HUB" status --porcelain)" ]; then
+  git -C "$HUB" add -A
+  git -C "$HUB" -c user.email="steve@designerwallcoverings.com" -c user.name="Steve" commit -q -m "sync builds from source" && echo "committed hub"
+fi

← f7583fe Arcade: add Starling build + per-game icon + open-in-own-win  ·  back to Games Agentabrams  ·  games.aa: add 90210 Backgammon to the arcade 2b93b5e →