OLD | NEW |
(Empty) | |
| 1 library initialize.tool.rename_build_outputs; |
| 2 |
| 3 import 'dart:io'; |
| 4 |
| 5 import 'package:path/path.dart'; |
| 6 |
| 7 main() { |
| 8 var scriptPath = Platform.script.path; |
| 9 if (context.style.name == 'windows') scriptPath = scriptPath.substring(1); |
| 10 var dir = join(dirname(dirname(scriptPath)), 'build', 'test'); |
| 11 for (var file in new Directory(dir).listSync()) { |
| 12 var filepath = file.path; |
| 13 var name = basename(filepath); |
| 14 if (name.endsWith('.initialize.dart')) { |
| 15 var newPath = join(dirname(filepath), |
| 16 name.replaceFirst('.initialize.dart', '.initialize_test.dart')); |
| 17 print('Copying $filepath to $newPath'); |
| 18 new File(filepath).copySync(newPath); |
| 19 } |
| 20 } |
| 21 } |
OLD | NEW |