Files
configs/Makefile

30 lines
1.0 KiB
Makefile

.PHONY: zsh update-zsh tmux update-tmux
zsh:
@for file in zsh/.[!.]*; do \
file=$${file#zsh/}; \
[ -f "$$HOME/$$file" ] && mv "$$HOME/$$file" "$$HOME/$$file.bak"; \
done && cp -r zsh/.[!.]* ~/ && echo "zsh files copied to home directory" || echo "zsh files not copied to home directory"
update-zsh:
@for file in zsh/.[!.]*; do \
base=$$(basename $$file); \
if [ -f "$$HOME/$$base" ]; then \
cp -v "$$HOME/$$base" "$$file"; \
fi \
done && echo "zsh files updated from home directory" || echo "zsh files not updated from home directory"
tmux:
@if [ -f "$$HOME/.tmux.conf" ]; then \
mv "$$HOME/.tmux.conf" "$$HOME/.tmux.conf.bak"; \
cp tmux/.tmux.conf "$$HOME/.tmux.conf"; \
echo ".tmux.conf copied to home directory"; \
else \
echo ".tmux.conf not found in home directory"; \
fi
update-tmux:
@if [ -f "$$HOME/.tmux.conf" ]; then \
cp "$$HOME/.tmux.conf" tmux/.tmux.conf; \
fi
@echo "tmux files updated from home directory"