aboutsummaryrefslogtreecommitdiff
path: root/scripts/setup-chess.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-17 14:44:04 -0500
committerCraig Jennings <c@cjennings.net>2026-05-17 14:44:04 -0500
commit7cd739234e9c83be9c82200a918281780f38fc9a (patch)
treefc6875371c213e7555781501d7349b33ca1f2bd4 /scripts/setup-chess.sh
parent663cec6520a72680609c0d803494fb0bde4ce765 (diff)
downloadarchsetup-7cd739234e9c83be9c82200a918281780f38fc9a.tar.gz
archsetup-7cd739234e9c83be9c82200a918281780f38fc9a.zip
fix(archsetup): handle stow-created ~/.emacs.d when cloning dotemacs
The 2026-05-16 VM run surfaced `setting up emacs configuration files (error code: 128)` with `fatal: not a git repository`. Root cause: `dotfiles/common/.emacs.d/calendar-sync.local.el` lives in the stow tree, so by the time the dotemacs clone step runs, `~/.emacs.d/` already exists with a stowed symlink inside. The previous two-branch check `[ -d "$emacs_dir" ]` then took the `git pull` path and failed because the dir isn't a git checkout. I replaced the check with three branches: - `.git` exists → `git pull --recurse-submodules` (the existing upgrade path). - Dir missing or empty → `git clone --recurse-submodules` (the fresh install path). - Dir exists with content but no `.git` (the stow case, today's bug) → `git init` + `remote add origin` + `fetch --recurse-submodules` + `checkout -B main origin/main` + `submodule update --init --recursive`. This pulls the tree in on top of the stowed file without losing it. The one-line `[ -d ]` → `[ -d .git ]` fix wouldn't have been enough on its own: the clone branch would still fail because `git clone` refuses a non-empty target. `bash -n archsetup` is clean. The VM test run that surfaced the bug exercised the old two-branch path. The new third branch wants a fresh `make test` to verify before this lands on a real machine. todo.org picks up two things this commit touches. The stale gitrepos.sh reference under "Remove/template personal info from scripts" comes out. A new sub-TODO under `[#B] Fix install errors` expands the existing tidaler item: the same "AUR exit 0 logged as error" pattern now hits six packages instead of one (tidaler, mkinitcpio-firmware, speedtest-go-bin, rar, masterpdfeditor, zsh-fast-syntax-highlighting-git). The recommendation points at `aur_install` and the error-summary aggregator as trace targets.
Diffstat (limited to 'scripts/setup-chess.sh')
0 files changed, 0 insertions, 0 deletions