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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user