diff options
author | Florian Zschocke <f.zschocke+git@gmail.com> | 2021-07-21 20:05:56 +0200 |
---|---|---|
committer | Florian Zschocke <f.zschocke+git@gmail.com> | 2021-07-21 20:05:56 +0200 |
commit | 9a747d0074a5b814061bef7a065bbad116e9e8c6 (patch) | |
tree | 1fbf523cab021540e69fea28f77379e9d005f26f /src | |
parent | b50628d5cf317b07b40c67a049b527837661b934 (diff) | |
parent | fd51a29c3cc80a188113809c662ef45aa6a4e81c (diff) | |
download | gitblit-9a747d0074a5b814061bef7a065bbad116e9e8c6.tar.gz gitblit-9a747d0074a5b814061bef7a065bbad116e9e8c6.zip |
Merge pull request #1370 from Zwixx/master
This commit merges the pull request from Zwixx, with additional
changes via a separate Zwixx-fix-cmds branch.
Closes #1370
Diffstat (limited to 'src')
-rw-r--r-- | src/main/distrib/win/add-indexed-branch.cmd | 4 | ||||
-rw-r--r-- | src/main/distrib/win/authority.cmd | 9 | ||||
-rw-r--r-- | src/main/distrib/win/gitblit-stop.cmd | 2 | ||||
-rw-r--r-- | src/main/distrib/win/gitblit.cmd | 9 | ||||
-rw-r--r-- | src/main/distrib/win/installService.cmd | 22 | ||||
-rw-r--r-- | src/main/distrib/win/migrate-tickets.cmd | 12 | ||||
-rw-r--r-- | src/main/distrib/win/reindex-tickets.cmd | 12 | ||||
-rw-r--r-- | src/main/distrib/win/uninstallService.cmd | 6 |
8 files changed, 52 insertions, 24 deletions
diff --git a/src/main/distrib/win/add-indexed-branch.cmd b/src/main/distrib/win/add-indexed-branch.cmd index 37121ee6..25b46383 100644 --- a/src/main/distrib/win/add-indexed-branch.cmd +++ b/src/main/distrib/win/add-indexed-branch.cmd @@ -14,7 +14,11 @@ @REM Set BRANCH ("default" or fully qualified ref - i.e. refs/heads/master)
@REM Set EXCLUSIONS for any repositories that you do not want to change
@REM --------------------------------------------------------------------------
+@SETLOCAL
@SET FOLDER=data/git
@SET EXCLUSIONS=--skip test.git --skip group/test*
@SET BRANCH=default
+@PUSHD %~dp0
@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.AddIndexedBranch --repositoriesFolder %FOLDER% --branch %BRANCH% %EXCLUSIONS% %*
+@POPD
+@ENDLOCAL
diff --git a/src/main/distrib/win/authority.cmd b/src/main/distrib/win/authority.cmd index 3a27c8a9..a313cd73 100644 --- a/src/main/distrib/win/authority.cmd +++ b/src/main/distrib/win/authority.cmd @@ -1 +1,8 @@ -@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.authority.GitblitAuthority --baseFolder data %*
+@SETLOCAL
+
+@SET gbhome=%~dp0
+@SET gbhome=%gbhome:~0,-1%
+
+@java -cp "%gbhome%\gitblit.jar";"%gbhome%\ext\*" com.gitblit.authority.GitblitAuthority --baseFolder "%gbhome%\data" %*
+
+@ENDLOCAL
diff --git a/src/main/distrib/win/gitblit-stop.cmd b/src/main/distrib/win/gitblit-stop.cmd index b6bebd8a..b2cdbc44 100644 --- a/src/main/distrib/win/gitblit-stop.cmd +++ b/src/main/distrib/win/gitblit-stop.cmd @@ -1 +1 @@ -@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.GitBlitServer --stop --baseFolder data %*
+@java -cp "%~dp0gitblit.jar";"%~dp0ext\*" com.gitblit.GitBlitServer --stop %*
diff --git a/src/main/distrib/win/gitblit.cmd b/src/main/distrib/win/gitblit.cmd index 6cd193dd..c02e3896 100644 --- a/src/main/distrib/win/gitblit.cmd +++ b/src/main/distrib/win/gitblit.cmd @@ -1 +1,8 @@ -@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.GitBlitServer --baseFolder data %*
+@SETLOCAL
+
+@SET gbhome=%~dp0
+@SET gbhome=%gbhome:~0,-1%
+
+@java -cp "%gbhome%\gitblit.jar";"%gbhome%\ext\*" com.gitblit.GitBlitServer --baseFolder "%gbhome%\data" %*
+
+@ENDLOCAL
diff --git a/src/main/distrib/win/installService.cmd b/src/main/distrib/win/installService.cmd index ef2ba2d0..23d45a46 100644 --- a/src/main/distrib/win/installService.cmd +++ b/src/main/distrib/win/installService.cmd @@ -8,31 +8,37 @@ @REM
@REM http://commons.apache.org/daemon/procrun.html
+@SETLOCAL
+
@REM arch = x86, amd64, or ia32
SET ARCH=amd64
+@SET gbhome=%~dp0
+@SET gbhome=%gbhome:~0,-1%
+
@REM Be careful not to introduce trailing whitespace after the ^ characters.
@REM Use ; or # to separate values in the --StartParams parameter.
-"%CD%\%ARCH%\gitblit.exe" //IS//gitblit ^
+"%gbhome%\%ARCH%\gitblit.exe" //IS//gitblit ^
--DisplayName="gitblit" ^
--Description="a pure Java Git solution" ^
--Startup=auto ^
- --LogPath="%CD%\logs" ^
+ --LogPath="%gbhome%\logs" ^
--LogLevel=INFO ^
--LogPrefix=gitblit ^
--StdOutput=auto ^
--StdError=auto ^
- --StartPath="%CD%" ^
+ --StartPath="%gbhome%" ^
--StartClass=com.gitblit.GitBlitServer ^
--StartMethod=main ^
- --StartParams="--storePassword;gitblit;--baseFolder;%CD%\data" ^
+ --StartParams="--storePassword;gitblit;--baseFolder;%gbhome%\data" ^
--StartMode=jvm ^
- --StopPath="%CD%" ^
+ --StopPath="%gbhome%" ^
--StopClass=com.gitblit.GitBlitServer ^
--StopMethod=main ^
- --StopParams="--stop;--baseFolder;%CD%\data" ^
+ --StopParams="--stop;--baseFolder;%gbhome%\data" ^
--StopMode=jvm ^
- --Classpath="%CD%\gitblit.jar;%CD%\ext\*" ^
+ --Classpath="%gbhome%\gitblit.jar;%gbhome%\ext\*" ^
--Jvm=auto ^
--JvmMx=1024
-
\ No newline at end of file +
+@ENDLOCAL
diff --git a/src/main/distrib/win/migrate-tickets.cmd b/src/main/distrib/win/migrate-tickets.cmd index 5a26c8ed..e08c5a84 100644 --- a/src/main/distrib/win/migrate-tickets.cmd +++ b/src/main/distrib/win/migrate-tickets.cmd @@ -9,13 +9,13 @@ @if [%2]==[] goto help
-@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.MigrateTickets %1 --baseFolder %2
+@java -cp "%~dp0gitblit.jar";"%~dp0ext\*" com.gitblit.MigrateTickets %1 --baseFolder %2
@goto end
:help
-@echo "Please specify the output ticket service and your baseFolder!"
-@echo
-@echo " migrate-tickets com.gitblit.tickets.RedisTicketService c:/gitblit-data"
-@echo
+@echo Please specify the output ticket service and your baseFolder!
+@echo.
+@echo e.g.: migrate-tickets com.gitblit.tickets.RedisTicketService "c:/gitblit data"
+@echo.
-:end
\ No newline at end of file +:end
diff --git a/src/main/distrib/win/reindex-tickets.cmd b/src/main/distrib/win/reindex-tickets.cmd index c9116ca2..49eb122e 100644 --- a/src/main/distrib/win/reindex-tickets.cmd +++ b/src/main/distrib/win/reindex-tickets.cmd @@ -10,13 +10,13 @@ @REM --------------------------------------------------------------------------
@if [%1]==[] goto nobasefolder
-@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.ReindexTickets --baseFolder %1
+@java -cp "%~dp0gitblit.jar";"%~dp0ext\*" com.gitblit.ReindexTickets --baseFolder %1
@goto end
:nobasefolder
-@echo "Please specify your baseFolder!"
-@echo
-@echo " reindex-tickets c:/gitblit-data"
-@echo
+@echo Please specify your baseFolder!
+@echo.
+@echo reindex-tickets c:/gitblit-data
+@echo.
-:end
\ No newline at end of file +:end
diff --git a/src/main/distrib/win/uninstallService.cmd b/src/main/distrib/win/uninstallService.cmd index e6c3b98c..6a574d19 100644 --- a/src/main/distrib/win/uninstallService.cmd +++ b/src/main/distrib/win/uninstallService.cmd @@ -1,5 +1,9 @@ +@SETLOCAL
+
@REM arch = x86, amd64, or ia32
SET ARCH=amd64
@REM Delete the gitblit service
-"%CD%\%ARCH%\gitblit.exe" //DS//gitblit
\ No newline at end of file +"%~dp0%ARCH%\gitblit.exe" //DS//gitblit
+
+@ENDLOCAL
|