| OLD | NEW |
| 1 @echo off | 1 @echo off |
| 2 rem #!/bin/bash --posix | 2 rem #!/bin/bash --posix |
| 3 rem Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 rem Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 4 rem for details. All rights reserved. Use of this source code is governed by a | 4 rem for details. All rights reserved. Use of this source code is governed by a |
| 5 rem BSD-style license that can be found in the LICENSE file. | 5 rem BSD-style license that can be found in the LICENSE file. |
| 6 rem | 6 rem |
| 7 rem stop if any of the steps fails | 7 rem stop if any of the steps fails |
| 8 rem set -e | 8 rem set -e |
| 9 rem | 9 rem |
| 10 | 10 |
| 11 rem SCRIPT_DIR=$(dirname $0) | 11 rem SCRIPT_DIR=$(dirname $0) |
| 12 set SCRIPT_DIR=%~dp0 | 12 set SCRIPT_DIR=%~dp0 |
| 13 if %SCRIPT_DIR:~-1%==\ set SCRIPT_DIR=%SCRIPT_DIR:~0,-1% | 13 if %SCRIPT_DIR:~-1%==\ set SCRIPT_DIR=%SCRIPT_DIR:~0,-1% |
| 14 | 14 |
| 15 rem DART_ANALYZER_HOME=$(dirname $SCRIPT_DIR) | 15 rem DART_ANALYZER_HOME=$(dirname $SCRIPT_DIR) |
| 16 for /f %%i in ('echo %SCRIPT_DIR%') do set DART_ANALYZER_HOME=%%~dpi | 16 for %%A in ("%SCRIPT_DIR\..") do set "DART_ANALYZER_HOME=%%~fA" |
| 17 if %DART_ANALYZER_HOME:~-1%==\ set DART_ANALYZER_HOME=%DART_ANALYZER_HOME:~0,-1% | 17 if %DART_ANALYZER_HOME:~-1%==\ set DART_ANALYZER_HOME=%DART_ANALYZER_HOME:~0,-1% |
| 18 | 18 |
| 19 set FOUND_BATCH=0 | 19 set FOUND_BATCH=0 |
| 20 set FOUND_SDK=0 | 20 set FOUND_SDK=0 |
| 21 for %%a in (%*) do ( | 21 for %%a in (%*) do ( |
| 22 if [%%a] == [--batch] set FOUND_BATCH=1 | 22 if [%%a] == [--batch] set FOUND_BATCH=1 |
| 23 if [%%a] == [-b] set FOUND_BATCH=1 | 23 if [%%a] == [-b] set FOUND_BATCH=1 |
| 24 if [%%a] == [--dart-sdk] set FOUND_SDK=1 | 24 if [%%a] == [--dart-sdk] set FOUND_SDK=1 |
| 25 ) | 25 ) |
| 26 | 26 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 rem fi | 130 rem fi |
| 131 rem fi | 131 rem fi |
| 132 rem | 132 rem |
| 133 | 133 |
| 134 java %EXTRA_JVMARGS% %DART_JVMARGS% -ea -classpath "@CLASSPATH@" ^ | 134 java %EXTRA_JVMARGS% %DART_JVMARGS% -ea -classpath "@CLASSPATH@" ^ |
| 135 com.google.dart.compiler.DartCompiler %DART_SDK% %* | 135 com.google.dart.compiler.DartCompiler %DART_SDK% %* |
| 136 | 136 |
| 137 rem exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \ | 137 rem exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \ |
| 138 rem com.google.dart.compiler.DartCompiler ${DART_SDK} $@ | 138 rem com.google.dart.compiler.DartCompiler ${DART_SDK} $@ |
| 139 rem | 139 rem |
| OLD | NEW |