mirror of
				https://github.com/klmp200/vim-sync.git
				synced 2025-10-31 09:03:07 +00:00 
			
		
		
		
	Added backup and fancy messages
This commit is contained in:
		
							
								
								
									
										13
									
								
								install.pl
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								install.pl
									
									
									
									
									
								
							| @@ -3,7 +3,12 @@ | ||||
| use 5.018; | ||||
| use autodie; | ||||
| use Cwd 'realpath'; | ||||
| use File::Copy 'move'; | ||||
|  | ||||
| say "Backuping your original vimrc"; | ||||
| move "$ENV{'HOME'}/.vimrc", "$ENV{'HOME'}/.vimrc.old"; | ||||
|  | ||||
| say "Writing your new config"; | ||||
| open my $vimrc, '>', "$ENV{'HOME'}/.vimrc"; | ||||
|  | ||||
| my $script = realpath($0); | ||||
| @@ -12,8 +17,12 @@ my $path = $script =~ s#/(\w|\.)+\z##ar; | ||||
| select $vimrc; | ||||
| say "let syncdir=\"$path/\""; | ||||
| say 'exec "source ".syncdir."vimrc"'; | ||||
| select STDIN; | ||||
| select STDOUT; | ||||
|  | ||||
| close $vimrc; | ||||
|  | ||||
| `git clone https://github.com/VundleVim/Vundle.vim $ENV{'HOME'}/.vim/bundle/Vundle.vim` | ||||
| say "Installing Vundle"; | ||||
| `git clone https://github.com/VundleVim/Vundle.vim $ENV{'HOME'}/.vim/bundle/Vundle.vim`; | ||||
|  | ||||
| say "Installation complete"; | ||||
| say "Now just launch vim and use :PluginInstall to complete your install"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user