From 13bd2073ef50c927b487451171ff5cd97e697705 Mon Sep 17 00:00:00 2001 From: Sergii Tykhomyrov Date: Thu, 28 Nov 2024 07:09:52 +0100 Subject: Add more configs and Makefile --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3