Showing with 5 additions and 3 deletions.
  1. +5 −3 bin/lein.bat
@@ -6,13 +6,12 @@ setLocal EnableExtensions EnableDelayedExpansion
rem LEIN_JAR and LEIN_HOME variables can be set manually.
-if "x%LEIN_JAR%" == "x" set LEIN_JAR="%~dp0%leiningen-!LEIN_VERSION!-standalone.jar"
+if "x%LEIN_HOME%" == "x" set LEIN_HOME=%USERPROFILE%\.lein
+if "x%LEIN_JAR%" == "x" set LEIN_JAR="!LEIN_HOME!\self-installs\leiningen-!LEIN_VERSION!-standalone.jar"
if "x%1" == "xself-install" goto SELF_INSTALL
if "x%1" == "xupgrade" goto NO_UPGRADE
-if "x%LEIN_HOME%" == "x" set LEIN_HOME=%USERPROFILE%\.lein
rem If ORIGINAL_PWD ends with a backslash (such as C:\),
rem we need to escape it with a second backslash.
@@ -91,6 +90,9 @@ if exist %LEIN_JAR% (
echo %LEIN_JAR% already exists. Delete and retry.
goto EOF
+for %%f in (%LEIN_JAR%) do set LEIN_INSTALL_DIR="%%~dpf"
+if not exist %LEIN_INSTALL_DIR% mkdir %LEIN_INSTALL_DIR%
set HTTP_CLIENT=wget --no-check-certificate -O
wget>nul 2>&1
if ERRORLEVEL 9009 (

0 comments on commit b61da8c

Please sign in to comment.