From 37368c63004586684e46e1622e79363c315beb9b Mon Sep 17 00:00:00 2001 From: Przemyslaw Grondek Date: Mon, 18 Sep 2023 18:07:38 +0200 Subject: [PATCH] Fix git overriding local configuration --- Makefile | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 06bd7b3..d2531f9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,23 @@ FILES = .bash_aliases .bashrc .inputrc .profile .vimrc .xsessionrc +CONFIGS = .config/mimeapps.list .config/picom.conf .config/redshift.conf .config/user-dirs.dirs -install: +install: install_config cp -v $(FILES) $(HOME) cp -rv bin/* $(HOME)/bin cp -rv .local $(HOME) - cp -rv .config $(HOME) + +install_config: install_config_git install_config_polybar install_config_other + +install_config_git: +ifneq ("$(wildcard $(HOME)/.config/git/config)","") + @echo "Git config found, skipping install" +else + mkdir -p $(HOME)/.config/git + cp .config/git/config $(HOME)/.config/git +endif + +install_config_polybar: + cp -rv .config/polybar $(HOME)/.config + +install_config_other: + cp -rv $(CONFIGS) $(HOME)/.config