| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #import('dart:io'); | 5 #import('dart:io'); |
| 6 #import('dart:uri'); | 6 #import('dart:uri'); |
| 7 | 7 |
| 8 #import('../../lib/compiler/implementation/util/uri_extras.dart'); | 8 #import('../../lib/compiler/implementation/util/uri_extras.dart'); |
| 9 #import('../../lib/compiler/implementation/filenames.dart'); | 9 #import('../../lib/compiler/implementation/filenames.dart'); |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 BIN_DIR="\$(cd "\${0%/*}" ; pwd -P)" | 109 BIN_DIR="\$(cd "\${0%/*}" ; pwd -P)" |
| 110 | 110 |
| 111 unset COLORS | 111 unset COLORS |
| 112 if test -t 1; then | 112 if test -t 1; then |
| 113 # Stdout is a terminal. | 113 # Stdout is a terminal. |
| 114 if test 8 -le `tput colors`; then | 114 if test 8 -le `tput colors`; then |
| 115 # Stdout has at least 8 colors, so enable colors. | 115 # Stdout has at least 8 colors, so enable colors. |
| 116 COLORS="--enable-diagnostic-colors" | 116 COLORS="--enable-diagnostic-colors" |
| 117 fi | 117 fi |
| 118 fi | 118 fi |
| 119 exec "\$BIN_DIR"/dart$options "\$BIN_DIR/$path" \$COLORS "\$@" | 119 |
| 120 unset SNAPSHOT |
| 121 if test -f "\$BIN_DIR/${path}.snapshot"; then |
| 122 # TODO(ahe): Remove the following line when we are relatively sure it works. |
| 123 echo Using snapshot "\$BIN_DIR/${path}.snapshot" 1>&2 |
| 124 SNAPSHOT="--use_script_snapshot=\$BIN_DIR/${path}.snapshot" |
| 125 fi |
| 126 exec "\$BIN_DIR"/dart$options \$SNAPSHOT "\$BIN_DIR/$path" \$COLORS "\$@" |
| 120 ''', | 127 ''', |
| 121 ''' | 128 ''' |
| 122 @echo off | 129 @echo off |
| 123 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 130 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 124 REM for details. All rights reserved. Use of this source code is governed by a | 131 REM for details. All rights reserved. Use of this source code is governed by a |
| 125 REM BSD-style license that can be found in the LICENSE file. | 132 REM BSD-style license that can be found in the LICENSE file. |
| 126 | 133 |
| 127 set SCRIPTPATH=%~dp0 | 134 set SCRIPTPATH=%~dp0 |
| 128 | 135 |
| 129 REM Does the path have a trailing slash? If so, remove it. | 136 REM Does the path have a trailing slash? If so, remove it. |
| 130 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% | 137 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% |
| 131 | 138 |
| 132 set arguments=%* | 139 set arguments=%* |
| 133 | 140 |
| 134 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% | 141 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% |
| 135 '''.replaceAll('\n', '\r\n')]; | 142 '''.replaceAll('\n', '\r\n')]; |
| 136 } | 143 } |
| OLD | NEW |