Add cross-machine sync tooling (clone/pull/push all module repos)

repos.txt + sync-*.sh let any machine (Mac or Windows/Git Bash) hydrate all 49
module repos and keep them in sync via GitHub+gitea. Pulls are fast-forward only
(never clobber local work); pushes send commits only and flag uncommitted repos.
See SYNC.md for the two-machine workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-06-09 21:34:32 -04:00
parent 14cd6a666b
commit 4830613701
6 changed files with 241 additions and 0 deletions

23
sync-refresh-list.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Regenerate repos.txt from the actual module folders present here (any top-level
# folder that is its own git repo with a github.com/gsinghpal origin). Run this
# after you add or remove a module repo, then commit repos.txt so both machines
# pick up the change.
#
# bash sync-refresh-list.sh
set -uo pipefail
cd "$(dirname "$0")" || exit 1
{
echo "# Module repos that live as independent git repos inside this folder."
echo "# Owner: github.com/gsinghpal/<name> + gitea git.nexasystems.ca/admin/<name>"
echo "# One repo name per line. Used by sync-*.sh. Regenerate with: bash sync-refresh-list.sh"
for d in */; do
d="${d%/}"
[ -d "$d/.git" ] || continue
url=$(git -C "$d" remote get-url origin 2>/dev/null || true)
case "$url" in *github.com/gsinghpal/*) echo "$d" ;; esac
done
} > repos.txt.tmp && mv repos.txt.tmp repos.txt
echo "repos.txt now lists $(grep -cvE '^\s*#|^\s*$' repos.txt) repos"