aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0f829b0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,32 @@
+SHELL := /bin/zsh
+STOW := stow
+STOW_FLAGS := --dotfiles --target=$(HOME)
+
+PACKAGES := $(dir $(wildcard */))
+
+.PHONY: all install uninstall list clean help
+
+all: install
+
+install:
+ @for package in $(PACKAGES); do \
+ echo "Installing $$package..."; \
+ $(STOW) $(STOW_FLAGS) $$package; \
+ done
+
+uninstall:
+ @for package in $(PACKAGES); do \
+ echo "Uninstalling $$package..."; \
+ $(STOW) -D $(STOW_FLAGS) $$package; \
+ done
+
+list:
+ @echo "Available packages:"
+ @for package in $(PACKAGES); do \
+ echo " - $$package"; \
+ done
+
+clean:
+ @for package in $(PACKAGES); do \
+ $(STOW) -D $(STOW_FLAGS) $$package 2>/dev/null || true; \
+ done