]> nmode's Git Repositories - signal-cli/blobdiff - gradlew.bat
Fix typo
[signal-cli] / gradlew.bat
index 9109989e3cbf666b0a3c8f48fd92bd03bb53b968..7101f8e4676fcad8adc961e929ea3bcb37b5262f 100644 (file)
@@ -14,7 +14,7 @@
 @rem limitations under the License.\r
 @rem\r
 \r
-@if "%DEBUG%" == "" @echo off\r
+@if "%DEBUG%"=="" @echo off\r
 @rem ##########################################################################\r
 @rem\r
 @rem  Gradle startup script for Windows\r
@@ -25,7 +25,8 @@
 if "%OS%"=="Windows_NT" setlocal\r
 \r
 set DIRNAME=%~dp0\r
-if "%DIRNAME%" == "" set DIRNAME=.\r
+if "%DIRNAME%"=="" set DIRNAME=.\r
+@rem This is normally unused\r
 set APP_BASE_NAME=%~n0\r
 set APP_HOME=%DIRNAME%\r
 \r
@@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
 \r
 set JAVA_EXE=java.exe\r
 %JAVA_EXE% -version >NUL 2>&1\r
-if "%ERRORLEVEL%" == "0" goto init\r
+if %ERRORLEVEL% equ 0 goto execute\r
 \r
-echo.\r
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r
-echo.\r
-echo Please set the JAVA_HOME variable in your environment to match the\r
-echo location of your Java installation.\r
+echo. 1>&2\r
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\r
+echo. 1>&2\r
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2\r
+echo location of your Java installation. 1>&2\r
 \r
 goto fail\r
 \r
@@ -54,48 +55,36 @@ goto fail
 set JAVA_HOME=%JAVA_HOME:"=%\r
 set JAVA_EXE=%JAVA_HOME%/bin/java.exe\r
 \r
-if exist "%JAVA_EXE%" goto init\r
+if exist "%JAVA_EXE%" goto execute\r
 \r
-echo.\r
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r
-echo.\r
-echo Please set the JAVA_HOME variable in your environment to match the\r
-echo location of your Java installation.\r
+echo. 1>&2\r
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\r
+echo. 1>&2\r
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2\r
+echo location of your Java installation. 1>&2\r
 \r
 goto fail\r
 \r
-:init\r
-@rem Get command-line arguments, handling Windows variants\r
-\r
-if not "%OS%" == "Windows_NT" goto win9xME_args\r
-\r
-:win9xME_args\r
-@rem Slurp the command line arguments.\r
-set CMD_LINE_ARGS=\r
-set _SKIP=2\r
-\r
-:win9xME_args_slurp\r
-if "x%~1" == "x" goto execute\r
-\r
-set CMD_LINE_ARGS=%*\r
-\r
 :execute\r
 @rem Setup the command line\r
 \r
 set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar\r
 \r
+\r
 @rem Execute Gradle\r
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*\r
 \r
 :end\r
 @rem End local scope for the variables with windows NT shell\r
-if "%ERRORLEVEL%"=="0" goto mainEnd\r
+if %ERRORLEVEL% equ 0 goto mainEnd\r
 \r
 :fail\r
 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r
 rem the _cmd.exe /c_ return code!\r
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1\r
-exit /b 1\r
+set EXIT_CODE=%ERRORLEVEL%\r
+if %EXIT_CODE% equ 0 set EXIT_CODE=1\r
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%\r
+exit /b %EXIT_CODE%\r
 \r
 :mainEnd\r
 if "%OS%"=="Windows_NT" endlocal\r