fix(install): Only add gitconfig include when necessary

This commit is contained in:
Saibotk 2024-04-02 23:54:59 +02:00
parent d00d50015e
commit 490ddddfbd
Signed by: saibotk
GPG key ID: 67585F0065E261D5

View file

@ -20,12 +20,14 @@ ln -s $DOTFILES/zsh/.zshrc $HOME/.zshrc
# git # git
# We only include our config here to allow other tools to still modify the gitconfig locally with user specific paths etc. # 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. # E.g. znap adds maintenance entries there.
if ! grep -q "path = $DOTFILES/.gitconfig" ~/.gitconfig; then
echo "Adding gitconfig include statement to ~/.gitconfig"
echo """ echo """
[include] [include]
path = ~/.dotfiles/.gitconfig path = $DOTFILES/.gitconfig
""" >> $HOME/.gitconfig """ >> $HOME/.gitconfig
fi
# tmux # tmux
rm -rf $HOME/.tmux.conf rm -rf $HOME/.tmux.conf
@ -44,6 +46,6 @@ if [ ! -f ~/.config/nvim/autoload/plug.vim ]; then
fi fi
# Install + update all nvim plugins # Install + update all nvim plugins
nvim +PlugUpgrade +PlugUpdate +qall # nvim +PlugUpgrade +PlugUpdate +qall
echo "Done! All set up, ready to be used!" echo "Done! All set up, ready to be used!"