fix(install): Only add gitconfig include when necessary
This commit is contained in:
parent
d00d50015e
commit
490ddddfbd
1 changed files with 6 additions and 4 deletions
10
install.sh
10
install.sh
|
@ -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!"
|
||||||
|
|
Loading…
Add table
Reference in a new issue