Skip to content

Commit

Permalink
add backup .vim files in xp-installer
Browse files Browse the repository at this point in the history
I believe the original bootstrap.sh checks if the files to be backed up
exist and are not symbolic links. In case of XP I think that not backing
up if "..\.spf13-vim-3" exists would probably be sufficient to save
updating users the wait.
If they decided to use the distribution the .vimrc should not be edited
manually anyway.
  • Loading branch information
jhnwsk committed Oct 17, 2012
1 parent 855e7ff commit 027746b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spf13-vim-windows-xp-install.cmd
Expand Up @@ -2,6 +2,16 @@
@if not exist "%HOME%" @set HOME=%USERPROFILE%

@set BASE_DIR=%HOME%\.spf13-vim-3

@if not exist "%BASE_DIR%" (
echo backing up existing vim config
@set today=%DATE%
@if exist "%HOME%\.vim" call xcopy /s/e/h/y/r/q/i "%HOME%\.vim" "%HOME%\.vim.%today%"
@if exist "%HOME%\.vimrc" call copy "%HOME%\.vimrc" "%HOME%\.vimrc.%today%"
@if exist "%HOME%\_vimrc" call copy "%HOME%\_vimrc" "%HOME%\_vimrc.%today%"
@if exist "%HOME%\.gvimrc" call copy "%HOME%\.gvimrc" "%HOME%\.gvimrc.%today%"
)

call git clone --recursive -b 3.0 git://github.com/spf13/spf13-vim.git "%BASE_DIR%"
call mkdir "%BASE_DIR%\.vim\bundle"
call copy "%BASE_DIR%\.vim" "%HOME%\.vim"
Expand Down

0 comments on commit 027746b

Please sign in to comment.