# HG changeset patch # User Ludovic Chabant # Date 1323376178 28800 # Node ID 8021bd1438f6079ae750ae5f6eedae8ea6bc52fc # Parent 966df1f863beda9b802d7f7ee3b03278f06f5642 Handle existing files before setting up shortcuts. diff -r 966df1f863be -r 8021bd1438f6 install.cmd --- a/install.cmd Thu Dec 08 08:14:40 2011 -0800 +++ b/install.cmd Thu Dec 08 12:29:38 2011 -0800 @@ -3,13 +3,32 @@ set CWD=%~dp0 +:: VIM Files +if exist "%userprofile%\vimfiles" ( + set /P confirm=Will delete existing "%userprofile%\vimfiles". OK with that? Press CTRL-C to abort. + rmdir /Q /S "%userprofile%\vimfiles" +) mklink /D "%userprofile%\vimfiles" "%CWD%vim" + +if exist "%userprofile%\_vimrc" ( + set /P confirm=Will delete existing "%userprofile%\_vimrc". OK with that? Press CTRL-C to abort. + del /Q "%userprofile%\_vimrc" +) mklink "%userprofile%\_vimrc" "%CWD%vim\vimrc" +:: Mercurial Files +if exist "%userprofile%\mercurial.ini" ( + set /P confirm=Will delete existing "%userprofile%\mercurial.ini". OK with that? Press CTRL-C to abort. + del /Q "%userprofile%\mercurial.ini" +) echo %%include %CWD%hgrc\hgrc > "%userprofile%\mercurial.ini" echo [extensions] >> "%userprofile%\mercurial.ini" echo hggit = %CWD:\=/%lib/hg/hg-git/hggit/ >> "%userprofile%\mercurial.ini" echo onsub = %CWD:\=/%lib/hg/onsub/onsub.py >> "%userprofile%\mercurial.ini" +if exist "%userprofile%\mercurial_ignore" ( + set /P confirm=Will delete existing "%userprofile%\mercurial_ignore". OK with that? Press CTRL-C to abort. + del /Q "%userprofile%\mercurial_ignore" +) mklink "%userprofile%\mercurial_ignore" "%CWD%hgrc\hgignore"