Skip to content

Commit

Permalink
Merge 'net-installer-proxy' into HEAD
Browse files Browse the repository at this point in the history
This branch adds support for running the net installer in environments
where a proxy is required to access the web (this is often the case in
corporate setups).

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Mar 28, 2015
2 parents 054e57d + 783f742 commit 9bc6dae
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions net-installer/setup-git-sdk.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
@EXIT 1
)

@REM Maybe we need a proxy?
@IF %counter% GEQ 2 (
@ECHO.
@ECHO There was a problem accessing the MSys2 repositories
@ECHO If your setup requires an HTTP proxy to access the web,
@ECHO please specify it here, otherwise leave it empty.
@ECHO.
@SET /p proxy= "HTTP proxy: "
)
@REM Check the proxy variable here because of delayed expansion
@IF NOT "%proxy%" == "" (
@SET http_proxy=%proxy%
@SET https_proxy=%proxy%
)

@REM update the Pacman package indices first, then force-install msys2-runtime
@REM (we ship with a stripped-down msys2-runtime, gpg and pacman), so that
@REM pacman's post-install scripts run without complaining about heap problems
Expand Down Expand Up @@ -71,6 +86,16 @@
CALL %cwd%\autorebase.bat
)

@REM If an HTTP proxy is requires, configure it for Git Bash sessions,
@REM but only if the environment variable was not already set globally
@IF DEFINED proxy (
@ECHO http_proxy=%proxy% > etc\profile.d\proxy.sh
@ECHO https_proxy=%proxy% >> etc\profile.d\proxy.sh
@ECHO export http_proxy https_proxy >> etc\profile.d\proxy.sh
@ECHO.
@ECHO Installed /etc/profile.d/proxy.sh to set proxy in Git Bash
)

@REM Install shortcut on the desktop
@ECHO.
@ECHO Installing the 'Git SDK @@BITNESS@@-bit' shortcut on the Desktop
Expand Down

0 comments on commit 9bc6dae

Please sign in to comment.