Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(864)

Side by Side Diff: dart/utils/compiler/build_helper.dart

Issue 10910006: Improve detection of when to use colors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/lib/compiler/implementation/dart2js.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 options = ' --heap_growth_rate=32$options'; 96 options = ' --heap_growth_rate=32$options';
97 97
98 return [ 98 return [
99 ''' 99 '''
100 #!/bin/sh 100 #!/bin/sh
101 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 101 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
102 # for details. All rights reserved. Use of this source code is governed by a 102 # for details. All rights reserved. Use of this source code is governed by a
103 # BSD-style license that can be found in the LICENSE file. 103 # BSD-style license that can be found in the LICENSE file.
104 104
105 BIN_DIR=`dirname \$0` 105 BIN_DIR=`dirname \$0`
106 NO_COLORS="--no-colors" 106 unset COLORS
107 if test -t 1; then 107 if test -t 1; then
108 # Enable colors if stdout is a terminal. 108 # Stdout is a terminal.
109 unset NO_COLORS 109 if test 8 -le `tput colors`; then
110 # Stdout has at least 8 colors, so enable colors.
111 COLORS="--colors"
112 fi
110 fi 113 fi
111 exec \$BIN_DIR/dart$options \$BIN_DIR/$path \$NO_COLORS "\$@" 114 exec \$BIN_DIR/dart$options \$BIN_DIR/$path \$COLORS "\$@"
112 ''', 115 ''',
113 ''' 116 '''
114 @echo off 117 @echo off
115 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 118 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
116 REM for details. All rights reserved. Use of this source code is governed by a 119 REM for details. All rights reserved. Use of this source code is governed by a
117 REM BSD-style license that can be found in the LICENSE file. 120 REM BSD-style license that can be found in the LICENSE file.
118 121
119 set SCRIPTPATH=%~dp0 122 set SCRIPTPATH=%~dp0
120 123
121 REM Does the path have a trailing slash? If so, remove it. 124 REM Does the path have a trailing slash? If so, remove it.
122 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% 125 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
123 126
124 set arguments=%* 127 set arguments=%*
125 128
126 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" --no-colors %arguments% 129 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments%
127 '''.replaceAll('\n', '\r\n')]; 130 '''.replaceAll('\n', '\r\n')];
128 } 131 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698