mirror of
https://github.com/klmp200/vim-sync.git
synced 2024-11-24 18:14:22 +00:00
Better backup
This commit is contained in:
parent
9729f2467b
commit
e7bf265776
@ -3,10 +3,13 @@
|
|||||||
use 5.018;
|
use 5.018;
|
||||||
use autodie;
|
use autodie;
|
||||||
use Cwd 'realpath';
|
use Cwd 'realpath';
|
||||||
use File::Copy 'move';
|
|
||||||
|
|
||||||
say "Backuping your original vimrc";
|
say "Backuping your original vimrc";
|
||||||
move "$ENV{'HOME'}/.vimrc", "$ENV{'HOME'}/.vimrc.old";
|
eval {
|
||||||
|
rename "$ENV{'HOME'}/.vimrc", "$ENV{'HOME'}/.vimrc.old";
|
||||||
|
} or do {
|
||||||
|
say "No file to backup";
|
||||||
|
};
|
||||||
|
|
||||||
say "Writing your new config";
|
say "Writing your new config";
|
||||||
open my $vimrc, '>', "$ENV{'HOME'}/.vimrc";
|
open my $vimrc, '>', "$ENV{'HOME'}/.vimrc";
|
||||||
|
Loading…
Reference in New Issue
Block a user