From 490ddddfbdfa9eb74e9154cbe39554453e13c2a4 Mon Sep 17 00:00:00 2001 From: Saibotk Date: Tue, 2 Apr 2024 23:54:59 +0200 Subject: [PATCH] fix(install): Only add gitconfig include when necessary --- install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index a101ab1..3750a9d 100755 --- a/install.sh +++ b/install.sh @@ -20,12 +20,14 @@ ln -s $DOTFILES/zsh/.zshrc $HOME/.zshrc # git # We only include our config here to allow other tools to still modify the gitconfig locally with user specific paths etc. # E.g. znap adds maintenance entries there. +if ! grep -q "path = $DOTFILES/.gitconfig" ~/.gitconfig; then +echo "Adding gitconfig include statement to ~/.gitconfig" + echo """ - [include] -path = ~/.dotfiles/.gitconfig - +path = $DOTFILES/.gitconfig """ >> $HOME/.gitconfig +fi # tmux rm -rf $HOME/.tmux.conf @@ -44,6 +46,6 @@ if [ ! -f ~/.config/nvim/autoload/plug.vim ]; then fi # Install + update all nvim plugins -nvim +PlugUpgrade +PlugUpdate +qall +# nvim +PlugUpgrade +PlugUpdate +qall echo "Done! All set up, ready to be used!"