diff options
| -rwxr-xr-x | archsetup | 10 | ||||
| -rw-r--r-- | docs/post-install-checklist.org | 13 | ||||
| -rwxr-xr-x | scripts/cmail-setup-finish.sh | 22 |
3 files changed, 32 insertions, 13 deletions
@@ -3892,10 +3892,12 @@ outro() { printf "\n" printf "If you use Proton Mail Bridge for cmail triage, finish the setup\n" printf "after reboot:\n" - printf " 1. Clone claude-templates to ~/projects/claude-templates if missing.\n" - printf " 2. Run 'protonmail-bridge --cli', log in, then quit.\n" - printf " 3. Run ~/code/archsetup/scripts/cmail-setup-finish.sh\n" - printf " 4. First mail sync: mbsync cmail && mu index\n" + printf " 1. Run 'protonmail-bridge --cli', log in, then quit.\n" + printf " 2. Run ~/code/archsetup/scripts/cmail-setup-finish.sh\n" + printf " 3. First mail sync: mbsync cmail && mu index\n" + printf "\n" + printf "Sending mail also needs cmail-action, which rulesets owns:\n" + printf "clone it to ~/code/rulesets and run 'make install'.\n" printf "\n" printf "Please reboot before working with your new workstation.\n\n" diff --git a/docs/post-install-checklist.org b/docs/post-install-checklist.org index f0545a7..8c48938 100644 --- a/docs/post-install-checklist.org +++ b/docs/post-install-checklist.org @@ -97,7 +97,12 @@ needs doing. The installer's completion message carries the steps; recorded here too so the checklist is complete: -1. Clone claude-templates to =~/projects/claude-templates= if missing. -2. Run =protonmail-bridge --cli=, log in, then quit. -3. Run =~/code/archsetup/scripts/cmail-setup-finish.sh=. -4. First mail sync: =mbsync cmail && mu index=. +1. Run =protonmail-bridge --cli=, log in, then quit. +2. Run =~/code/archsetup/scripts/cmail-setup-finish.sh=. +3. First mail sync: =mbsync cmail && mu index=. + +Sending mail also needs =cmail-action= on PATH, which rulesets owns: clone it +to =~/code/rulesets= and run =make install=. That is not a prerequisite for the +steps above — the setup script warns and carries on — but =mbsync= is the first +thing that wants it. An agent session runs =make install= at startup, so on a +machine that runs them the link appears on its own. diff --git a/scripts/cmail-setup-finish.sh b/scripts/cmail-setup-finish.sh index bd72499..8c27eda 100755 --- a/scripts/cmail-setup-finish.sh +++ b/scripts/cmail-setup-finish.sh @@ -7,10 +7,13 @@ # - protonmail-bridge installed (archsetup handles it) # - You have run 'protonmail-bridge --cli', logged in, and quit at least once # (the script looks for state at ~/.config/protonmail/bridge-v3/) -# - cmail-action on PATH (rulesets' `make install` links it; session start -# runs that, so it arrives on its own) # - dotfiles stowed (~/.config/.cmailpass.gpg present) # +# Not a pre-req, but checked and warned about: cmail-action on PATH. rulesets' +# `make install` links it, and session start runs that, so on a machine that +# runs agent sessions it arrives without anyone asking. On one that doesn't, +# it needs the command by hand. The script never invokes it either way. +# # What it does: # 1. Decrypts ~/.config/.cmailpass.gpg → ~/.config/.cmailpass (mode 0600) # 2. Copies Bridge's self-signed cert → ~/.config/protonbridge.pem @@ -28,6 +31,7 @@ set -euo pipefail err() { printf 'error: %s\n' "$*" >&2; exit 1; } +warn() { printf 'warning: %s\n' "$*" >&2; } info() { printf '==> %s\n' "$*"; } ok() { printf ' %s\n' "$*"; } @@ -50,10 +54,18 @@ bridge_state="$HOME/.config/protonmail/bridge-v3" # cmail-action is no longer this script's to install. It lives in rulesets at # claude-templates/bin/, and rulesets' `make install` links everything there -# into ~/.local/bin — which every session start runs, so the symlink reaches -# each machine on its own. Check that it arrived rather than placing it. +# into ~/.local/bin. Session start runs that, so on a machine that runs agent +# sessions the symlink arrives on its own; on one that doesn't, it needs the +# command below. +# +# A warning rather than an abort, because this script never invokes the tool. +# Its job is to leave Bridge working, and it can finish that whether or not a +# mail client has been linked yet. Aborting here would make Bridge setup +# depend on rulesets being cloned and installed first, an ordering neither +# repo otherwise needs, and would strand a fresh machine with Bridge ready and +# the script refusing to configure it. command -v cmail-action >/dev/null 2>&1 \ - || err "cmail-action not on PATH — run 'make -C ~/code/rulesets install'" + || warn "cmail-action not on PATH — run 'make -C ~/code/rulesets install' before sending mail" cmailpass_enc="$HOME/.config/.cmailpass.gpg" [ -f "$cmailpass_enc" ] \ |
