Clone dotfiles in case of neovim

This commit is contained in:
Thomas Forgione 2019-04-26 15:32:43 +02:00
parent 6552a124c4
commit aa2404161c
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 21 additions and 14 deletions

View File

@ -104,13 +104,8 @@ git_clone() {
fi fi
} }
configure_zsh() { clone_dotfiles() {
if [ ! -d $HOME/.config/dotfiles ]; then
yes_no_ask "do you wish to install and configure zsh ?"
if [ $? -ne 0 ]; then
info "not installing zsh"
return
fi
test_command git test_command git
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -123,6 +118,20 @@ configure_zsh() {
fi fi
fi fi
git_clone https://gitea.tforgione.fr/tforgione/dotfiles/ $HOME/.config/dotfiles
fi
}
configure_zsh() {
yes_no_ask "do you wish to install and configure zsh ?"
if [ $? -ne 0 ]; then
info "not installing zsh"
return
fi
clone_dotfiles
test_command zsh test_command zsh
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
if [ $sudo_available -ne 0 ]; then if [ $sudo_available -ne 0 ]; then
@ -139,10 +148,6 @@ configure_zsh() {
git_clone https://github.com/robbyrussell/oh-my-zsh/ $HOME/.config/oh-my-zsh git_clone https://github.com/robbyrussell/oh-my-zsh/ $HOME/.config/oh-my-zsh
fi fi
if [ ! -d $HOME/.config/dotfiles ]; then
git_clone https://gitea.tforgione.fr/tforgione/dotfiles/ $HOME/.config/dotfiles
fi
if [ -f $HOME/.zshrc ]; then if [ -f $HOME/.zshrc ]; then
path1=`realpath $HOME/.zshrc` path1=`realpath $HOME/.zshrc`
path2=`realpath $HOME/.config/dotfiles/zshrc` path2=`realpath $HOME/.config/dotfiles/zshrc`
@ -203,6 +208,8 @@ configure_neovim() {
return return
fi fi
clone_dotfiles
test_command nvim test_command nvim
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
info "installing neovim" info "installing neovim"