| Index: pkg/intl/test/message_extraction/find_output_directory.dart
|
| diff --git a/pkg/intl/test/message_extraction/find_output_directory.dart b/pkg/intl/test/message_extraction/find_output_directory.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bb623893c00d9a0b1b85ef2b49322f51541afd57
|
| --- /dev/null
|
| +++ b/pkg/intl/test/message_extraction/find_output_directory.dart
|
| @@ -0,0 +1,19 @@
|
| +/**
|
| + * A shared library for finding the valu eof the --output-dir parameter
|
| + * which all of these programs use.
|
| + */
|
| +library find_output_directory;
|
| +
|
| +const directiveName = '--output-dir=';
|
| +
|
| +_asString(list) => new String.fromCharCodes(list);
|
| +
|
| +findOutputDirectory(List<String> args) {
|
| + var directive = args.firstWhere(
|
| + (x) => x.contains(directiveName),
|
| + orElse: () => null);
|
| + if (directive == null) return '.';
|
| + var file = directive.codeUnits.skip(directiveName.length);
|
| + return _asString(file);
|
| +}
|
| +
|
|
|