aboutsummaryrefslogtreecommitdiff
path: root/scripts/setup-chess-README.md
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-17 14:08:18 -0500
committerCraig Jennings <c@cjennings.net>2026-05-17 14:08:18 -0500
commit9ccfcfde2ec79b1a8b7ca7df985313ac3db7f51a (patch)
tree6e8ca1bbfe95b3729af2fc18767886d84e315377 /scripts/setup-chess-README.md
parent8f9d4696d57d1e9e47827c1c8f8b9061f690caf6 (diff)
downloadarchsetup-9ccfcfde2ec79b1a8b7ca7df985313ac3db7f51a.tar.gz
archsetup-9ccfcfde2ec79b1a8b7ca7df985313ac3db7f51a.zip
refactor(scripts/post-install): consolidate gitrepos.sh and harden the script
gitrepos.sh did the same `~/.dotfiles` / `~/.emacs.d` remote swap that post-install.sh already had, plus a `git pull --set-upstream origin main` follow-on that post-install was missing. I folded the pull into the post-install remote-rewrite block and dropped gitrepos.sh. While in the file, I also: - Quoted every variable (`"$logfile"`, `"$HOME"` paths, `"$(whoami)"`). - Sent the remote-rewrite block to the log file like the other blocks do (was leaking to stdout). - Made the remote-rewrite idempotent. A re-run used to break the `cd && remote remove && remote add` chain because remove fails when origin is already the desired URL. The loop now uses `git -C "$dir" remote set-url` when origin exists and `remote add` when it does not. - Pre-created `~/sync`, `~/pictures`, `~/code`, `~/projects` so the clones don't fail on missing parent dirs. - Wrapped each `git clone` in a `clone_if_missing` helper so a re-run skips destinations that already exist instead of erroring out. README.md picks up the gitrepos.sh removal in the forking note.
Diffstat (limited to 'scripts/setup-chess-README.md')
0 files changed, 0 insertions, 0 deletions