fix(deploy): override packages target home-relative paths

zz-<host> packages nest base-package dirs internally (zz-blankpad/niri/.config/...);
stripping only the package prefix yielded targets like $HOME/niri/.config/... .
Strip the nested package segment for zz-* packages so overrides land on the
same home-relative target as the base copy they override.
This commit is contained in:
Frank
2026-09-09 19:45:44 -07:00
parent 5efb218061
commit cc2c652cc2
+4 -1
View File
@@ -98,7 +98,10 @@ for pkg in "${PKGS[@]}"; do
continue
fi
while IFS= read -r -d '' f; do
deploy_file "$f" "${f#"$pkg"/}"
rel="${f#"$pkg"/}"
# override packages nest base-package dirs internally: strip that segment for targets
if [ "${pkgname#zz-}" != "$pkgname" ]; then case "$rel" in */*) [ -d "$PKGS_DIR/${rel%%/*}" ] && rel="${rel#*/}";; esac; fi
deploy_file "$f" "$rel"
done < <(find "$pkg" -type f ! -name 'dump.txt' -print0)
done