setup static method
Implementation
static Future<void> setup() async {
File script = File('data/vision.swift');
if (!script.existsSync()) {
await script.create(recursive: true);
await script.writeAsString(_script);
ProcessResult result = await ProcessUtil.run('chmod', [
'+x',
script.path,
]);
if (result.exitCode != 0) {
throw Exception('Failed to make script executable: ${result.stderr}');
}
verbose('Swift OCR script created at ${script.path}');
}
}