| Index: dart/utils/dartdoc/build_helper.dart
|
| diff --git a/dart/utils/dartdoc/build_helper.dart b/dart/utils/dartdoc/build_helper.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..dc0df608f2172e800215e2aba8e723711a7afecf
|
| --- /dev/null
|
| +++ b/dart/utils/dartdoc/build_helper.dart
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +#import('dart:io');
|
| +
|
| +main() {
|
| + List<String> arguments = new Options().arguments;
|
| + print(arguments);
|
| + String dartVmLocation = '${arguments[0]}/dart';
|
| + String dartdocLocation = '${arguments[0]}/dart';
|
| + String dartdocScript = """
|
| +#!$dartVmLocation
|
| +
|
| +main() {
|
| + print(\"Hello, World! I'm $dartdocLocation\");
|
| +}
|
| +""";
|
| + var f = new File(dartdocLocation);
|
| + var stream = f.openOutputStreamSync();
|
| + // TODO(ahe): Encode char codes as UTF-8.
|
| + stream.write(dartdocScript.charCodes());
|
| + stream.close();
|
| + // TODO(ahe): Make script executable.
|
| + // TODO(ahe): Also make a .bat file for Windows.
|
| +}
|
|
|