From d533a00235e2e93776a3823f6e34b8db4641ae2a Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Tue, 5 Mar 2013 21:15:04 -0500 Subject: [PATCH] Make Windows Installer more robust & auto updating --- spf13-vim-windows-install.cmd | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/spf13-vim-windows-install.cmd b/spf13-vim-windows-install.cmd index fc1af68af..21d33ed97 100644 --- a/spf13-vim-windows-install.cmd +++ b/spf13-vim-windows-install.cmd @@ -2,12 +2,30 @@ @if not exist "%HOME%" @set HOME=%USERPROFILE% @set BASE_DIR=%HOME%\.spf13-vim-3 -call git clone --recursive -b 3.0 git://github.com/spf13/spf13-vim.git "%BASE_DIR%" -call mkdir "%BASE_DIR%\.vim\bundle" -call mklink /J "%HOME%\.vim" "%BASE_DIR%\.vim" +IF NOT EXIST "%BASE_DIR%" ( + call git clone --recursive -b 3.0 https://github.com/spf13/spf13-vim.git "%BASE_DIR%" +) ELSE ( + @set ORIGINAL_DIR=%CD% + echo updating spf13-vim + chdir /d "%BASE_DIR%" + call git pull + chdir /d "%ORIGINAL_DIR%" + call cd "%BASE_DIR%" +) + call mklink "%HOME%\.vimrc" "%BASE_DIR%\.vimrc" call mklink "%HOME%\_vimrc" "%BASE_DIR%\.vimrc" +call mklink "%HOME%\.vimrc.fork" "%BASE_DIR%\.vimrc.fork" call mklink "%HOME%\.vimrc.bundles" "%BASE_DIR%\.vimrc.bundles" +call mklink "%HOME%\.vimrc.bundles.fork" "%BASE_DIR%\.vimrc.bundles.fork" +call mklink /J "%HOME%\.vim" "%BASE_DIR%\.vim" + +IF NOT EXIST "%BASE_DIR%\.vim\bundle" ( + call mkdir "%BASE_DIR%\.vim\bundle" +) + +IF NOT EXIST "%HOME%/.vim/bundle/vundle" ( + call git clone https://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle" +) -call git clone http://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle" call vim -u "%BASE_DIR%/.vimrc.bundles" +BundleInstall! +BundleClean +qall