contrib/inkscape_tools: create target folder if it does not exists
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 13 Feb 2016 20:44:16 +0000 (15:44 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 16 Feb 2016 01:10:29 +0000 (20:10 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/inkscape_tools/src/svg_to_icons.nit

index bae4f7d..d2da62b 100644 (file)
@@ -75,8 +75,9 @@ end
 
 var out_path = opt_out.value
 if out_path == null then out_path = "."
+if not out_path.file_exists then out_path.mkdir
 if not out_path.file_exists then
-       stderr.write "Output dir '{out_path}' does not exist (use --out)\n"
+       print_error "Failed to create output dir '{out_path}'"
        exit 1
 end