.PHONY: zsh 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: @for file in tmux/.[!.]*; do \ file=$${file#tmux/}; \ [ -f "$$HOME/$$file" ] && mv "$$HOME/$$file" "$$HOME/$$file.bak"; \ done && cp -r tmux/.[!.]* ~/ && echo "tmux files copied to home directory" || echo "tmux files not copied to home directory" update-tmux: @if [ -f "$$HOME/.tmux.conf" ]; then \ cp "$$HOME/.tmux.conf" tmux/.tmux.conf; \ fi @if [ -d "$$HOME/.tmux" ]; then \ cp -r $$HOME/.tmux/* tmux/.tmux/; \ fi @echo "tmux files updated from home directory"