Remove systemd linking

This commit is contained in:
Evie Litherland-Smith 2023-01-31 08:35:35 +00:00
parent c23cb2d353
commit ca247db5b2

View file

@ -1,14 +1,11 @@
LOCAL_BIN := $(HOME)/.local/bin LOCAL_BIN := $(HOME)/.local/bin
CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config) CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config)
SYSTEMD_DIR := $(CONFIG_DIR)/systemd/user
FONT_DIR := $(HOME)/.local/share/fonts FONT_DIR := $(HOME)/.local/share/fonts
ZSH_DIR := $(if $(ZSH), $(ZSH), $(HOME)/.oh-my-zsh) ZSH_DIR := $(if $(ZSH), $(ZSH), $(HOME)/.oh-my-zsh)
ZSH_CUSTOM_DIR := $(if $(ZSH_CUSTOM), $(ZSH_CUSTOM), $(ZSH_DIR)/custom) ZSH_CUSTOM_DIR := $(if $(ZSH_CUSTOM), $(ZSH_CUSTOM), $(ZSH_DIR)/custom)
CONFIG_ITEMS := $(wildcard config/*) CONFIG_ITEMS := $(wildcard config/*)
CONFIG_TARGETS := $(CONFIG_ITEMS:config/%=$(CONFIG_DIR)/%) CONFIG_TARGETS := $(CONFIG_ITEMS:config/%=$(CONFIG_DIR)/%)
SYSTEMD_ITEMS := $(wildcard systemd/*)
SYSTEMD_TARGETS := $(SYSTEMD_ITEMS:systemd/%=$(SYSTEMD_DIR)/%)
FONT_ITEMS := $(wildcard nerdfont_symbols/*) FONT_ITEMS := $(wildcard nerdfont_symbols/*)
FONT_TARGETS := $(FONT_ITEMS:nerdfont_symbols/%=$(FONT_DIR)/%) FONT_TARGETS := $(FONT_ITEMS:nerdfont_symbols/%=$(FONT_DIR)/%)
BIN_ITEMS := $(wildcard bin/*) BIN_ITEMS := $(wildcard bin/*)
@ -23,7 +20,7 @@ POWERLEVEL_DIR := $(ZSH_CUSTOM_DIR)/themes/powerlevel10k
.PHONY := config bin all clean zsh ssh .PHONY := config bin all clean zsh ssh
config: $(CONFIG_TARGETS) $(SYSTEMD_TARGETS) zsh ssh config: $(CONFIG_TARGETS) zsh ssh
bin: $(BIN_TARGETS) bin: $(BIN_TARGETS)
@ -32,7 +29,6 @@ all: config bin
clean: clean:
# pipx uninstall-all # pipx uninstall-all
for link in $(CONFIG_TARGETS); do rm "$$link"; done for link in $(CONFIG_TARGETS); do rm "$$link"; done
for link in $(SYSTEMD_TARGETS); do rm "$$link"; done
for link in $(FONT_TARGETS); do rm "$$link"; done for link in $(FONT_TARGETS); do rm "$$link"; done
for link in $(BIN_TARGETS); do rm "$$link"; done for link in $(BIN_TARGETS); do rm "$$link"; done
for link in $(ZSH_TARGETS); do rm "$$link"; done for link in $(ZSH_TARGETS); do rm "$$link"; done
@ -42,10 +38,9 @@ zsh: $(ZSH_DIR) $(ZSH_CUSTOM_DIR) $(POWERLEVEL_DIR) $(ZSH_TARGETS)
ssh: $(HOME)/.ssh/config $(HOME)/.ssh/sockets ssh: $(HOME)/.ssh/config $(HOME)/.ssh/sockets
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/% $(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
$(SYSTEMD_TARGETS): $(SYSTEMD_DIR)/%: systemd/%
$(FONT_TARGETS): $(FONT_DIR)/%: nerdfont_symbols/% $(FONT_TARGETS): $(FONT_DIR)/%: nerdfont_symbols/%
$(ZSH_TARGETS): $(ZSH_CUSTOM_DIR)/%.zsh: %.zsh $(ZSH_TARGETS): $(ZSH_CUSTOM_DIR)/%.zsh: %.zsh
$(CONFIG_TARGETS) $(SYSTEMD_TARGETS) $(FONT_TARGETS) $(ZSH_TARGETS): $(CONFIG_TARGETS) $(FONT_TARGETS) $(ZSH_TARGETS):
ln -s $(PWD)/$? $@ ln -s $(PWD)/$? $@
$(BIN_TARGETS): $(LOCAL_BIN)/%: bin/% $(BIN_TARGETS): $(LOCAL_BIN)/%: bin/%
@ -69,5 +64,5 @@ $(POWERLEVEL_DIR):
$(HOME)/.gitconfig: $(HOME)/.gitconfig:
touch $@ touch $@
$(LOCAL_BIN) $(CONFIG_DIR) $(SYSTEMD_DIR) $(FONT_DIR) $(HOME)/.ssh $(HOME)/.ssh/sockets: $(LOCAL_BIN) $(CONFIG_DIR) $(FONT_DIR) $(HOME)/.ssh $(HOME)/.ssh/sockets:
mkdir -p $@ mkdir -p $@