include env.lat bootstrap steps in summary block

Add the two env.lat steps (Installing prerequisites, Installing
dotfiles via chezmoi) as pre-completed entries in the bottom summary.
STEPS counts increased by 2, STEP starts at 3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Anton Volnuhin 2026-03-03 23:07:35 +03:00
parent 2e30824131
commit 4f49ec9f80

View File

@ -20,19 +20,19 @@
# Signal env.lat to stop padding and let us handle our own formatting
echo "##ENVLAT_END##"
#Config
#Config step counts include 2 env.lat bootstrap steps
{{ if eq .chezmoi.os "darwin" -}}
STEPS=9
STEPS=11
{{ else if eq .chezmoi.os "freebsd" -}}
STEPS=9
STEPS=11
{{ else if eq .chezmoi.os "openbsd" -}}
STEPS=8
STEPS=10
{{ else if eq .chezmoi.osRelease.id "ubuntu" -}}
STEPS=14
STEPS=16
{{ else if eq .chezmoi.osRelease.id "debian" -}}
STEPS=13
STEPS=15
{{ else -}}
STEPS=12
STEPS=14
{{ end -}}
PAD_LEN=4
@ -98,7 +98,7 @@ cd
#Setup
USER=$(whoami)
STEP=1
STEP=3 # env.lat already completed steps 1-2
if [ "$NON_INTERACTIVE" -eq 1 ]; then
# Simple output for non-interactive mode (Vagrant, CI, etc.)
@ -177,6 +177,13 @@ fi
if [ "$NON_INTERACTIVE" -eq 0 ]; then
LINES=$(tput lines)
print_block
# Pre-fill env.lat bootstrap steps as already completed
tput csr 0 $LINES
tput cup $(($LINES - $STEPS - 2 + 1)) 0
echo -e "==> "$Green"Installing prerequisites"$NC
tput cup $(($LINES - $STEPS - 2 + 2)) 0
echo -e "==> "$Green"Installing dotfiles via chezmoi"$NC
tput csr 0 $(($LINES - $STEPS - 3))
fi
new_line "Update caches and upgrade packages"