make: exclude local-only packages and use --restow for idempotency

Filter out resources and wluma from PACKAGES since they are
local-only and should not be stowed. Use stow --restow so make link
can be run repeatedly without conflicts from pre-existing symlinks.
This commit is contained in:
2026-08-18 08:00:40 -06:00
parent f57dc1db3c
commit 5cfa02ea6b
+3 -3
View File
@@ -1,6 +1,6 @@
HOME_TARGET ?= $(HOME)
SYSTEM_DIRS := etc usr var opt boot
PACKAGES := $(patsubst %/,%,$(wildcard */))
PACKAGES := $(filter-out resources wluma,$(patsubst %/,%,$(wildcard */)))
.PHONY: check-stow pull-updates unlink link
@@ -77,10 +77,10 @@ link: check-stow
done; \
if [ "$$is_sys" -eq 1 ]; then \
echo " [System] Stowing $$pkg/$$sub to $$sub"; \
sudo stow -d "$$pkg" -t "/$$sub" "$$sub"; \
sudo stow --restow -d "$$pkg" -t "/$$sub" "$$sub"; \
else \
echo " [USER] Stowing $$pkg/$$sub to $(HOME_TARGET)/$$sub"; \
stow -d "$$pkg" -t "$(HOME_TARGET)/$$sub" "$$sub"; \
stow --restow -d "$$pkg" -t "$(HOME_TARGET)/$$sub" "$$sub"; \
fi; \
done; \
done