Added backup and fancy messages

This commit is contained in:
Antoine Bartuccio 2016-07-18 09:01:50 +02:00
parent 36687d7db0
commit 9729f2467b
1 changed files with 11 additions and 2 deletions

View File

@ -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";