diff options
author | Florian Zschocke <f.zschocke+git@gmail.com> | 2021-07-21 09:50:59 +0200 |
---|---|---|
committer | Florian Zschocke <f.zschocke+git@gmail.com> | 2021-07-21 19:33:20 +0200 |
commit | d42411430114374bde004f38dae506704ceb3d3f (patch) | |
tree | 73f923b9b1be784115a5ea6bb2192c12624fdba3 /src/main | |
parent | 879ef53a94f23927a7ce3e8d5c05ac3731e37e79 (diff) | |
download | gitblit-d42411430114374bde004f38dae506704ceb3d3f.tar.gz gitblit-d42411430114374bde004f38dae506704ceb3d3f.zip |
Adjust remaining CMD scripts to use Gitblit home path.
Use the path of the script for the Gitblit home path in the remaining
batch scripts, too, to make it possible to call them from any other folder.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/distrib/win/add-indexed-branch.cmd | 2 | ||||
-rw-r--r-- | src/main/distrib/win/authority.cmd | 9 | ||||
-rw-r--r-- | src/main/distrib/win/migrate-tickets.cmd | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/main/distrib/win/add-indexed-branch.cmd b/src/main/distrib/win/add-indexed-branch.cmd index 37121ee6..af540777 100644 --- a/src/main/distrib/win/add-indexed-branch.cmd +++ b/src/main/distrib/win/add-indexed-branch.cmd @@ -17,4 +17,6 @@ @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
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/migrate-tickets.cmd b/src/main/distrib/win/migrate-tickets.cmd index 5a26c8ed..641157e8 100644 --- a/src/main/distrib/win/migrate-tickets.cmd +++ b/src/main/distrib/win/migrate-tickets.cmd @@ -9,7 +9,7 @@ @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
|