From d322a73b48c1b67e41b98ace53005edb08fe3425 Mon Sep 17 00:00:00 2001 From: froppa-agent <330570035+froppa-agent@users.noreply.github.com> Date: Mon, 12 Oct 2026 21:29:01 +0200 Subject: [PATCH] fix(follow-main): install canonical Heldra runtime --- .../systemd/user/follow-main.service | 2 +- home/dot_local/bin/executable_follow-main.sh | 32 +++++++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/home/dot_config/systemd/user/follow-main.service b/home/dot_config/systemd/user/follow-main.service index 21d77a7..65893b6 100644 --- a/home/dot_config/systemd/user/follow-main.service +++ b/home/dot_config/systemd/user/follow-main.service @@ -1,5 +1,5 @@ [Unit] -Description=Follow main: dotfiles through chezmoi, then Verk through its installer +Description=Follow main: dotfiles through chezmoi, then Heldra through its installer After=network-online.target [Service] diff --git a/home/dot_local/bin/executable_follow-main.sh b/home/dot_local/bin/executable_follow-main.sh index 84fe5c8..47dce1a 100755 --- a/home/dot_local/bin/executable_follow-main.sh +++ b/home/dot_local/bin/executable_follow-main.sh @@ -1,11 +1,11 @@ #!/usr/bin/env sh # Keep a Linux workstation (evo-dev) on the tip of main without a person at -# the keyboard: dotfiles through chezmoi, then Verk through its own guarded +# the keyboard: dotfiles through chezmoi, then Heldra through its own guarded # installer. Run by follow-main.timer (~/.config/systemd/user); by hand: # follow-main.sh # both -# follow-main.sh dotfiles # or: verk +# follow-main.sh dotfiles # or: heldra # Nothing here forces anything. A dirty or non-master dotfiles checkout is -# reported and left alone, and Verk's install-linux.sh refuses under a +# reported and left alone, and Heldra's install-linux.sh refuses under a # running chat turn (exit 3) or another install (exit 4); the next tick tries # again. Logs: journalctl --user -u follow-main. set -eu @@ -32,32 +32,36 @@ dotfiles() { fi } -verk() { - repo="$HOME/code/verk" - [ -d "$repo/.git" ] || return 0 +heldra() { + repo="$HOME/code/struktly/heldra" + [ -e "$repo/.git" ] || return 0 if [ -n "$(git -C "$repo" status --porcelain)" ]; then - echo "verk: $repo has local changes; not pulling" >&2 + echo "heldra: $repo has local changes; not pulling" >&2 + return 0 + fi + if [ "$(git -C "$repo" branch --show-current)" != main ]; then + echo "heldra: $repo is not on main; not pulling" >&2 return 0 fi git -C "$repo" pull -q --ff-only head=$(git -C "$repo" rev-parse HEAD) - if [ "$head" = "$(cat "$HOME/.verk/installed.commit" 2>/dev/null)" ]; then + if [ "$head" = "$(cat "$HOME/.heldra/installed.commit" 2>/dev/null)" ]; then return 0 fi - echo "verk: installing $head" + echo "heldra: installing $head" # Builds go through Depot's cache; mise supplies the pinned Go and Bun. rc=0 (cd "$repo" && mise exec -- depot exec -- ./scripts/install-linux.sh) || rc=$? case $rc in 0) ;; - 3 | 4) echo "verk: install refused (exit $rc); trying again next tick" ;; - *) echo "verk: install failed (exit $rc)" >&2; return "$rc" ;; + 3 | 4) echo "heldra: install refused (exit $rc); trying again next tick" ;; + *) echo "heldra: install failed (exit $rc)" >&2; return "$rc" ;; esac } case $what in - all) dotfiles; verk ;; + all) dotfiles; heldra ;; dotfiles) dotfiles ;; - verk) verk ;; - *) echo "usage: follow-main.sh [all|dotfiles|verk]" >&2; exit 2 ;; + heldra) heldra ;; + *) echo "usage: follow-main.sh [all|dotfiles|heldra]" >&2; exit 2 ;; esac