install.sh: respect /ext disabled state on re-run

When linking, check for <name>.ts.off pointing into this repo and skip
relinking if found. Means a previously /ext-disabled extension stays
disabled across install.sh re-runs (e.g. when adding a new extension).

README + AGENTS updated with the new behavior.
This commit is contained in:
2026-05-07 20:37:11 +02:00
parent d2b2b3fb43
commit 9f38ba7797
3 changed files with 14 additions and 0 deletions
+8
View File
@@ -151,9 +151,17 @@ do_install() {
in_install_set "$bare" || continue
local dest="${EXTENSIONS_DEST}/${name}"
local disabled="${dest}.off"
note "Linking ${name}"
# Respect a prior /ext disable: if <name>.ts.off exists and points
# into this repo, leave it alone. ext-toggle will flip it back.
if [[ -L "$disabled" ]] && link_into_repo "$disabled"; then
ok "${name} kept disabled (${name}.off present)"
continue
fi
if [[ -e "$dest" || -L "$dest" ]]; then
if link_into_repo "$dest"; then
ok "${name} already linked"