cmd: Use the same HOME fallback-logic as in etc/profile
[msysgit/kirr.git] / cmd / gitk.cmd
blobbf961968892166abe16a7d67bb651d942146fa38
1 @rem Do not use "echo off" to not affect any child calls.
2 @setlocal
4 @rem Get the abolute path to the parent directory, which is assumed to be the
5 @rem Git installation root.
6 @for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
7 @set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH%
9 @if not exist "%HOME%" @set HOME="%HOMEDRIVE%%HOMEPATH%"
10 @if not exist "%HOME%" @set HOME="%USERPROFILE%"
12 @start wish.exe "%git_install_root%\bin\gitk" -- %*