Clone dotfiles in case of neovim
This commit is contained in:
		
							parent
							
								
									6552a124c4
								
							
						
					
					
						commit
						aa2404161c
					
				
							
								
								
									
										35
									
								
								tforgione.sh
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								tforgione.sh
									
									
									
									
									
								
							@ -104,6 +104,24 @@ git_clone() {
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
clone_dotfiles() {
 | 
			
		||||
    if [ ! -d $HOME/.config/dotfiles ]; then
 | 
			
		||||
 | 
			
		||||
        test_command git
 | 
			
		||||
        if [ $? -ne 0 ]; then
 | 
			
		||||
            if [ $sudo_available -ne 0 ]; then
 | 
			
		||||
                error "git is needed, but you don't have git neither sudo"
 | 
			
		||||
                return 1
 | 
			
		||||
            else
 | 
			
		||||
                yes_no_ask_required "you'll need git for this, do you wish to install git ?"
 | 
			
		||||
                install git
 | 
			
		||||
            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 ?"
 | 
			
		||||
@ -112,16 +130,7 @@ configure_zsh() {
 | 
			
		||||
        return
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    test_command git
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        if [ $sudo_available -ne 0 ]; then
 | 
			
		||||
            error "git is needed, but you don't have git neither sudo"
 | 
			
		||||
            return 1
 | 
			
		||||
        else
 | 
			
		||||
            yes_no_ask_required "you'll need git for this, do you wish to install git ?"
 | 
			
		||||
            install git
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
    clone_dotfiles
 | 
			
		||||
 | 
			
		||||
    test_command zsh
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
@ -139,10 +148,6 @@ configure_zsh() {
 | 
			
		||||
        git_clone https://github.com/robbyrussell/oh-my-zsh/ $HOME/.config/oh-my-zsh
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if [ ! -d $HOME/.config/dotfiles ]; then
 | 
			
		||||
        git_clone https://gitea.tforgione.fr/tforgione/dotfiles/ $HOME/.config/dotfiles
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if [ -f $HOME/.zshrc ]; then
 | 
			
		||||
        path1=`realpath $HOME/.zshrc`
 | 
			
		||||
        path2=`realpath $HOME/.config/dotfiles/zshrc`
 | 
			
		||||
@ -203,6 +208,8 @@ configure_neovim() {
 | 
			
		||||
        return
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    clone_dotfiles
 | 
			
		||||
 | 
			
		||||
    test_command nvim
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        info "installing neovim"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user