-
Notifications
You must be signed in to change notification settings - Fork 6
/
apply-windows.cmd
67 lines (51 loc) · 2.26 KB
/
apply-windows.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
setlocal
REM Store some useful variables.
set "PWD=%cd%"
set "HOME=%USERPROFILE%"
REM Make a symlink for .emacs
set "EMACS_DOTFILE_FROM=%PWD%\editor\emacs\.spacemacs"
set "EMACS_DOTFILE_TO=%HOME%\AppData\Roaming\.spacemacs"
if exist "%EMACS_DOTFILE_TO%" del "%EMACS_DOTFILE_TO%"
REM Would prefer symlink here but that requires admin privileges,
REM something not supplied on non-professional Windows installs.
mklink /H "%EMACS_DOTFILE_TO%" "%EMACS_DOTFILE_FROM%"
REM Set up Git.
set "OLDPATH=%PATH%"
set "PATH=C:\Program Files (x86)\Git\bin;%PATH%"
git config --global user.name "Kevin Ushey"
git config --global user.email "[email protected]"
git config --global push.default current
git config --global credential.helper wincred
REM Set up _vimrc.
if not exist "%HOME%\.vim" mkdir "%HOME%\.vim"
set "VIMRC_DOTFILE_FROM=%PWD%\dotfiles\.vimrc"
set "VIMRC_DOTFILE_TO=%HOME%\_vimrc"
del "%VIMRC_DOTFILE_TO%"
mklink /H "%VIMRC_DOTFILE_TO%" "%VIMRC_DOTFILE_FROM%"
mklink /H "%HOME%\.vimrc" "%VIMRC_DOTFILE_TO%"
REM Link in other supporting Vim files.
set "VIM_STARTUP_DIR=%PWD%\editor\vim\startup"
mklink /J "%HOME%\.vim\startup" "%VIM_STARTUP_DIR%"
mklink /H "%HOME%\.vim\startup.vim" "%VIM_STARTUP_DIR%.vim"
REM Copy over the .Rprofile.
set "RPROFILE_DOTFILE_FROM=%PWD%\dotfiles\.Rprofile"
set "RPROFILE_DOTFILE_TO=%HOME%\.Rprofile"
if exist "%RPROFILE_DOTFILE_TO%" del "%RPROFILE_DOTFILE_TO%"
mklink /H %RPROFILE_DOTFILE_TO% %RPROFILE_DOTFILE_FROM%
REM Copy to Documents folder too, just in case.
set "RPROFILE_DOTFILE_TO=%HOME%\Documents\.Rprofile"
if exist "%HOME%\Documents" (
if exist "%RPROFILE_DOTFILE_TO%" del "%RPROFILE_DOTFILE_TO%"
mklink /H %RPROFILE_DOTFILE_TO% %RPROFILE_DOTFILE_FROM%
)
REM Copy over Qt Creator related items.
set "QT_CREATOR_DIR=%HOME%\AppData\Roaming\QtProject\qtcreator"
mkdir "%QT_CREATOR_DIR%\styles"
mkdir "%QT_CREATOR_DIR%\schemes"
mkdir "%QT_CREATOR_DIR%\snippets"
copy "%PWD%\editor\qt\schemes\keyboard.kms" "%QT_CREATOR_DIR%\schemes\keyboard.kms"
copy "%PWD%\editor\qt\snippets\snippets.xml" "%QT_CREATOR_DIR%\snippets\snippets.xml"
copy "%PWD%\editor\qt\styles\Tomorrow-Night-Bright.xml" "%QT_CREATOR_DIR%\styles\Tomorrow-Night-Bright.xml"
REM AutoHotkey.
copy "%PWD%\platform\windows\AutoHotkey.ahk" "%USERPROFILE%\Documents\AutoHotkey.ahk"
PAUSE