OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 import 'dart:io'; | 2 import 'dart:io'; |
3 | 3 |
4 main() { | 4 main(List<String> arguments) { |
5 final fileName = new Options().arguments.first; | 5 final fileName = arguments.first; |
6 final file = new File(fileName); | 6 final file = new File(fileName); |
7 final content = file.readAsStringSync(); | 7 final content = file.readAsStringSync(); |
8 file.writeAsStringSync('#!/usr/bin/env dart\n$content'); | 8 file.writeAsStringSync('#!/usr/bin/env dart\n$content'); |
9 // For development use the line below instead of the one above to | 9 // For development use the line below instead of the one above to |
10 // avoid using the dart2dart code. | 10 // avoid using the dart2dart code. |
11 // file.writeAsStringSync('#!/bin/bash\ndart bin/protoc_plugin.dart'); | 11 // file.writeAsStringSync('#!/bin/bash\ndart bin/protoc_plugin.dart'); |
12 } | 12 } |
OLD | NEW |