changeset 54:8021bd1438f6

Handle existing files before setting up shortcuts.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 08 Dec 2011 12:29:38 -0800
parents 966df1f863be
children a7932e0fa961
files install.cmd
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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"