contrib/inkscape_tools: create target folder if it does not exists
[nit.git] / 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