@Test public void testMainBadArgs() throws IOException { _thrown.expect(IllegalArgumentException.class); main(new String[] {}); }
public static void main(String[] args) throws IOException { checkArgument(args.length == 2, "Expected arguments: <input_dir> <output_dir>"); Path inputPath = Paths.get(args[0]); Path outputPath = Paths.get(args[1]); String wd = System.getenv("BUILD_WORKING_DIRECTORY"); if (wd != null) { inputPath = Paths.get(wd).resolve(inputPath); outputPath = Paths.get(wd).resolve(outputPath); } Settings settings = new Settings(new String[] {"-storagebase", "/"}); settings.setLogger(new BatfishLogger(BatfishLogger.LEVELSTR_WARN, false, System.out)); flatten(inputPath, outputPath, settings); }
Flatten { public static void main(String[] args) throws IOException { checkArgument(args.length == 2, "Expected arguments: <input_dir> <output_dir>"); Path inputPath = Paths.get(args[0]); Path outputPath = Paths.get(args[1]); String wd = System.getenv("BUILD_WORKING_DIRECTORY"); if (wd != null) { inputPath = Paths.get(wd).resolve(inputPath); outputPath = Paths.get(wd).resolve(outputPath); } Settings settings = new Settings(new String[] {"-storagebase", "/"}); settings.setLogger(new BatfishLogger(BatfishLogger.LEVELSTR_WARN, false, System.out)); flatten(inputPath, outputPath, settings); } }
Flatten { public static void main(String[] args) throws IOException { checkArgument(args.length == 2, "Expected arguments: <input_dir> <output_dir>"); Path inputPath = Paths.get(args[0]); Path outputPath = Paths.get(args[1]); String wd = System.getenv("BUILD_WORKING_DIRECTORY"); if (wd != null) { inputPath = Paths.get(wd).resolve(inputPath); outputPath = Paths.get(wd).resolve(outputPath); } Settings settings = new Settings(new String[] {"-storagebase", "/"}); settings.setLogger(new BatfishLogger(BatfishLogger.LEVELSTR_WARN, false, System.out)); flatten(inputPath, outputPath, settings); }  }
Flatten { public static void main(String[] args) throws IOException { checkArgument(args.length == 2, "Expected arguments: <input_dir> <output_dir>"); Path inputPath = Paths.get(args[0]); Path outputPath = Paths.get(args[1]); String wd = System.getenv("BUILD_WORKING_DIRECTORY"); if (wd != null) { inputPath = Paths.get(wd).resolve(inputPath); outputPath = Paths.get(wd).resolve(outputPath); } Settings settings = new Settings(new String[] {"-storagebase", "/"}); settings.setLogger(new BatfishLogger(BatfishLogger.LEVELSTR_WARN, false, System.out)); flatten(inputPath, outputPath, settings); }  static void main(String[] args); }
Flatten { public static void main(String[] args) throws IOException { checkArgument(args.length == 2, "Expected arguments: <input_dir> <output_dir>"); Path inputPath = Paths.get(args[0]); Path outputPath = Paths.get(args[1]); String wd = System.getenv("BUILD_WORKING_DIRECTORY"); if (wd != null) { inputPath = Paths.get(wd).resolve(inputPath); outputPath = Paths.get(wd).resolve(outputPath); } Settings settings = new Settings(new String[] {"-storagebase", "/"}); settings.setLogger(new BatfishLogger(BatfishLogger.LEVELSTR_WARN, false, System.out)); flatten(inputPath, outputPath, settings); }  static void main(String[] args);  }