]> source.dussan.org Git - gitblit.git/commitdiff
Add this into the install/uninstall and reindex of the service too
authorZwixx <zwiixx@googlemail.com>
Wed, 26 May 2021 15:47:17 +0000 (17:47 +0200)
committerFlorian Zschocke <florian.zschocke@devolo.de>
Wed, 21 Jul 2021 08:02:41 +0000 (10:02 +0200)
src/main/distrib/win/installService.cmd
src/main/distrib/win/reindex-tickets.cmd
src/main/distrib/win/uninstallService.cmd

index ef2ba2d0ee579032d34cfe4c9d6027b47b904d4a..532c63cd2152211d67223824996e406c6396ed7d 100644 (file)
 @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
index c9116ca2de519c13edc0954ceb538984550861f4..a2226d864b99e5cfad813055af1c13d85e7aba9a 100644 (file)
@@ -10,7 +10,7 @@
 @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
index e6c3b98cffa6990173ebda401daab174b60ed6fc..a32007e85fbc12278160726601d26f76396fdeff 100644 (file)
@@ -1,5 +1,6 @@
+\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