@REM arch = x86, amd64, or ia32\r
SET ARCH=amd64\r
\r
+@SET gbhome=%~dp0\r
+@SET gbhome=%gbhome:~0,-1%\r
+\r
@REM Be careful not to introduce trailing whitespace after the ^ characters.\r
@REM Use ; or # to separate values in the --StartParams parameter.\r
-"%CD%\%ARCH%\gitblit.exe" //IS//gitblit ^\r
+"%gbhome%\%ARCH%\gitblit.exe" //IS//gitblit ^\r
--DisplayName="gitblit" ^\r
--Description="a pure Java Git solution" ^\r
--Startup=auto ^\r
- --LogPath="%CD%\logs" ^\r
+ --LogPath="%gbhome%\logs" ^\r
--LogLevel=INFO ^\r
--LogPrefix=gitblit ^\r
--StdOutput=auto ^\r
--StdError=auto ^\r
- --StartPath="%CD%" ^\r
+ --StartPath="%gbhome%" ^\r
--StartClass=com.gitblit.GitBlitServer ^\r
--StartMethod=main ^\r
- --StartParams="--storePassword;gitblit;--baseFolder;%CD%\data" ^\r
+ --StartParams="--storePassword;gitblit;--baseFolder;%gbhome%\data" ^\r
--StartMode=jvm ^\r
- --StopPath="%CD%" ^\r
+ --StopPath="%gbhome%" ^\r
--StopClass=com.gitblit.GitBlitServer ^\r
--StopMethod=main ^\r
- --StopParams="--stop;--baseFolder;%CD%\data" ^\r
+ --StopParams="--stop;--baseFolder;%gbhome%\data" ^\r
--StopMode=jvm ^\r
- --Classpath="%CD%\gitblit.jar;%CD%\ext\*" ^\r
+ --Classpath="%gbhome%\gitblit.jar;%gbhome%\ext\*" ^\r
--Jvm=auto ^\r
--JvmMx=1024\r
\ No newline at end of file
@REM --------------------------------------------------------------------------\r
@if [%1]==[] goto nobasefolder\r
\r
-@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.ReindexTickets --baseFolder %1\r
+@java -cp "%~dp0gitblit.jar";"%~dp0ext\*" com.gitblit.ReindexTickets --baseFolder %1\r
@goto end\r
\r
:nobasefolder\r
+\r
@REM arch = x86, amd64, or ia32\r
SET ARCH=amd64\r
\r
@REM Delete the gitblit service\r
-"%CD%\%ARCH%\gitblit.exe" //DS//gitblit
\ No newline at end of file
+"%~dp0%ARCH%\gitblit.exe" //DS//gitblit\r