Mercurial > dotfiles
comparison install.cmd @ 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 | 92926116c4dd |
children | 6b2c3f14a5c1 |
comparison
equal
deleted
inserted
replaced
53:966df1f863be | 54:8021bd1438f6 |
---|---|
1 @echo off | 1 @echo off |
2 setlocal | 2 setlocal |
3 | 3 |
4 set CWD=%~dp0 | 4 set CWD=%~dp0 |
5 | 5 |
6 :: VIM Files | |
7 if exist "%userprofile%\vimfiles" ( | |
8 set /P confirm=Will delete existing "%userprofile%\vimfiles". OK with that? Press CTRL-C to abort. | |
9 rmdir /Q /S "%userprofile%\vimfiles" | |
10 ) | |
6 mklink /D "%userprofile%\vimfiles" "%CWD%vim" | 11 mklink /D "%userprofile%\vimfiles" "%CWD%vim" |
12 | |
13 if exist "%userprofile%\_vimrc" ( | |
14 set /P confirm=Will delete existing "%userprofile%\_vimrc". OK with that? Press CTRL-C to abort. | |
15 del /Q "%userprofile%\_vimrc" | |
16 ) | |
7 mklink "%userprofile%\_vimrc" "%CWD%vim\vimrc" | 17 mklink "%userprofile%\_vimrc" "%CWD%vim\vimrc" |
8 | 18 |
19 :: Mercurial Files | |
20 if exist "%userprofile%\mercurial.ini" ( | |
21 set /P confirm=Will delete existing "%userprofile%\mercurial.ini". OK with that? Press CTRL-C to abort. | |
22 del /Q "%userprofile%\mercurial.ini" | |
23 ) | |
9 echo %%include %CWD%hgrc\hgrc > "%userprofile%\mercurial.ini" | 24 echo %%include %CWD%hgrc\hgrc > "%userprofile%\mercurial.ini" |
10 echo [extensions] >> "%userprofile%\mercurial.ini" | 25 echo [extensions] >> "%userprofile%\mercurial.ini" |
11 echo hggit = %CWD:\=/%lib/hg/hg-git/hggit/ >> "%userprofile%\mercurial.ini" | 26 echo hggit = %CWD:\=/%lib/hg/hg-git/hggit/ >> "%userprofile%\mercurial.ini" |
12 echo onsub = %CWD:\=/%lib/hg/onsub/onsub.py >> "%userprofile%\mercurial.ini" | 27 echo onsub = %CWD:\=/%lib/hg/onsub/onsub.py >> "%userprofile%\mercurial.ini" |
13 | 28 |
29 if exist "%userprofile%\mercurial_ignore" ( | |
30 set /P confirm=Will delete existing "%userprofile%\mercurial_ignore". OK with that? Press CTRL-C to abort. | |
31 del /Q "%userprofile%\mercurial_ignore" | |
32 ) | |
14 mklink "%userprofile%\mercurial_ignore" "%CWD%hgrc\hgignore" | 33 mklink "%userprofile%\mercurial_ignore" "%CWD%hgrc\hgignore" |
15 | 34 |