Skip to content

Commit 6189daa

Browse files
committed
Script to set systemwide user path for Windows
New script adds the binary locations required for GIN to the user's run path. Release script adds set-global.bat script to Windows bundles.
1 parent 43c24f5 commit 6189daa

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

dorelease.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ def winbundle(binfile, git_pkg, annex_pkg):
446446
shutil.copy(binfile, bindir)
447447
shutil.copy("README.md", pkgroot)
448448
shutil.copy(os.path.join("scripts", "gin-shell.bat"), pkgroot)
449+
shutil.copy(os.path.join("scripts", "set-global.bat"), pkgroot)
449450

450451
gitdir = os.path.join(pkgroot, "git")
451452
os.makedirs(gitdir)

scripts/set-global.bat

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
:: GIN client global setup for Windows
2+
::
3+
:: This file should be part of the gin client Windows bundle. The purpose of
4+
:: the file is to permanently change the user path environment to be able to
5+
:: run GIN commands from the command line (cmd and PowerShell).
6+
7+
echo off
8+
9+
set curdir=%~dp0
10+
11+
echo Adding %curdir% to path
12+
set ginbinpath=%curdir%\bin
13+
set gitpaths=%curdir%\git\usr\bin;%curdir%\git\bin
14+
echo %path%|find /I "%curdir%">nul || setx path "%path%;%ginbinpath%;%gitpaths%"
15+
echo GIN CLI is ready
16+
pause

0 commit comments

Comments
 (0)