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