Remove installers from Makefile, fix SSH re-linking

This commit is contained in:
Evie Litherland-Smith 2023-01-30 22:44:10 +00:00
parent 501687493d
commit c23cb2d353

View file

@ -15,24 +15,20 @@ BIN_ITEMS := $(wildcard bin/*)
BIN_TARGETS := $(BIN_ITEMS:bin/%=$(LOCAL_BIN)/%) BIN_TARGETS := $(BIN_ITEMS:bin/%=$(LOCAL_BIN)/%)
ZSH_ITEMS := $(wildcard *.zsh) ZSH_ITEMS := $(wildcard *.zsh)
ZSH_TARGETS := $(ZSH_ITEMS:%.zsh=$(ZSH_CUSTOM_DIR)/%.zsh) ZSH_TARGETS := $(ZSH_ITEMS:%.zsh=$(ZSH_CUSTOM_DIR)/%.zsh)
INSTALLER_ITEMS := $(wildcard installers/*)
INSTALLER_TARGETS := $(INSTALLER_ITEMS:installers/%.sh=%)
PACKER_REPO := https://github.com/wbthomason/packer.nvim PACKER_REPO := https://github.com/wbthomason/packer.nvim
PACKER_DIR := $(HOME)/.local/share/nvim/site/pack/packer/start/packer.nvim PACKER_DIR := $(HOME)/.local/share/nvim/site/pack/packer/start/packer.nvim
POWERLEVEL_REPO := https://github.com/romkatv/powerlevel10k.git POWERLEVEL_REPO := https://github.com/romkatv/powerlevel10k.git
POWERLEVEL_DIR := $(ZSH_CUSTOM_DIR)/themes/powerlevel10k POWERLEVEL_DIR := $(ZSH_CUSTOM_DIR)/themes/powerlevel10k
.PHONY := all force clean config zsh nvim ssh git bin $(INSTALLER_TARGETS) .PHONY := config bin all clean zsh ssh
config: $(CONFIG_TARGETS) $(SYSTEMD_TARGETS) zsh ssh config: $(CONFIG_TARGETS) $(SYSTEMD_TARGETS) zsh ssh
bin: $(BIN_TARGETS) $(INSTALLER_TARGETS) bin: $(BIN_TARGETS)
all: config bin all: config bin
force: clean all
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
@ -43,7 +39,7 @@ clean:
zsh: $(ZSH_DIR) $(ZSH_CUSTOM_DIR) $(POWERLEVEL_DIR) $(ZSH_TARGETS) zsh: $(ZSH_DIR) $(ZSH_CUSTOM_DIR) $(POWERLEVEL_DIR) $(ZSH_TARGETS)
ssh: $(HOME)/.ssh/config ssh: $(HOME)/.ssh/config $(HOME)/.ssh/sockets
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/% $(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
$(SYSTEMD_TARGETS): $(SYSTEMD_DIR)/%: systemd/% $(SYSTEMD_TARGETS): $(SYSTEMD_DIR)/%: systemd/%
@ -55,10 +51,7 @@ $(CONFIG_TARGETS) $(SYSTEMD_TARGETS) $(FONT_TARGETS) $(ZSH_TARGETS):
$(BIN_TARGETS): $(LOCAL_BIN)/%: bin/% $(BIN_TARGETS): $(LOCAL_BIN)/%: bin/%
command -v $? 2> /dev/null || ln -s $(PWD)$? $@ command -v $? 2> /dev/null || ln -s $(PWD)$? $@
$(INSTALLER_TARGETS): $(LOCAL_BIN) $(HOME)/.ssh/config: $(HOME)/.ssh
./installers/$@.sh
$(HOME)/.ssh/config: $(HOME)/.ssh $(HOME)/.ssh/sockets
cp -n templates/ssh-config $@ cp -n templates/ssh-config $@
touch $@ touch $@