Created
June 30, 2015 09:46
-
-
Save hiredgunhouse/286b39f910c4e5d4b5b5 to your computer and use it in GitHub Desktop.
lein on windows - certificate issue - what needs to be commented out (use Powershell instead of wget or curl)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
:DownloadFile | |
rem parameters: TargetFileName Address | |
if NOT "x%HTTP_CLIENT%" == "x" ( | |
%HTTP_CLIENT% %1 %2 | |
goto EOF | |
) | |
REM call wget --help >nul 2>&1 | |
REM if NOT ERRORLEVEL 1 ( | |
REM call wget -O %1 %2 | |
REM goto EOF | |
REM ) | |
REM call curl --help >nul 2>&1 | |
REM if NOT ERRORLEVEL 1 ( | |
REM rem We set CURL_PROXY to a space character below to pose as a no-op argument | |
REM set CURL_PROXY= | |
REM if NOT "x%HTTPS_PROXY%" == "x" set CURL_PROXY="-x %HTTPS_PROXY%" | |
REM call curl %CURL_PROXY% -f -L -o %1 %2 | |
REM goto EOF | |
REM ) | |
call powershell -? >nul 2>&1 | |
if NOT ERRORLEVEL 1 ( | |
powershell -Command "& {param($a,$f) (new-object System.Net.WebClient).DownloadFile($a, $f)}" ""%2"" ""%1"" | |
goto EOF | |
) | |
goto NO_HTTP_CLIENT | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lines 8-20 had been commented out to go directly to Powershell method of downloading the file