OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 library build; | 6 library build; |
7 | 7 |
8 import 'tools/create_bootstrap.dart' as createBootstrap; | 8 import 'tools/create_bootstrap.dart' as createBootstrap; |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 | 10 |
11 void main() { | 11 void main(List<String> arguments) { |
12 final options = new Options(); | 12 final scriptPath = new Path(Platform.script).directoryPath; |
13 final scriptPath = new Path(options.script).directoryPath; | |
14 final libPath = scriptPath.append('lib'); | 13 final libPath = scriptPath.append('lib'); |
15 | 14 |
16 final changedOpt = "--changed=${libPath.append('js.dart')}"; | 15 final changedOpt = "--changed=${libPath.append('js.dart')}"; |
17 for (String arg in new Options().arguments) { | 16 for (String arg in arguments) { |
18 if (arg == changedOpt) { | 17 if (arg == changedOpt) { |
19 createBootstrap.create(libPath); | 18 createBootstrap.create(libPath); |
20 } | 19 } |
21 } | 20 } |
22 } | 21 } |
OLD | NEW |