From f8090c2a534c2efccaabd9e6fa2308895aa94db6 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 6 Nov 2011 22:13:31 +0100 Subject: Reinstated old -x and -s cmd-line parameters for backwards compatibility diff --git a/RELEASE_NOTES b/RELEASE_NOTES index cc6d99e..d67766c 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -30,7 +30,7 @@ o dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated. o The file, layer, origin and scale parameters to linear_extrude() and rotate_extrude() are now deprecated. Use an import() child instead. o import_dxf(), import_stl() and import_off() are now deprecated. Use import() instead. -o When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). +o When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). The -x and -s parameters are still working but deprecated. o F2 and F3 for Save and Reload is now deprecated OpenSCAD 2011.06 diff --git a/src/openscad.cc b/src/openscad.cc index 678d87a..d708a8e 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -134,6 +134,8 @@ int main(int argc, char **argv) ("help,h", "help message") ("version,v", "print the version") ("o,o", po::value(), "out-file") + ("s,s", po::value(), "stl-file") + ("x,x", po::value(), "dxf-file") ("d,d", po::value(), "deps-file") ("m,m", po::value(), "makefile") ("D,D", po::value >(), "var=val"); @@ -160,6 +162,16 @@ int main(int argc, char **argv) if (output_file) help(argv[0]); output_file = vm["o"].as().c_str(); } + if (vm.count("s")) { + fprintf(stderr, "DEPRECATED: The -s option is deprecated. Use -o instead.\n"); + if (output_file) help(argv[0]); + output_file = vm["s"].as().c_str(); + } + if (vm.count("x")) { + fprintf(stderr, "DEPRECATED: The -x option is deprecated. Use -o instead.\n"); + if (output_file) help(argv[0]); + output_file = vm["x"].as().c_str(); + } if (vm.count("d")) { if (deps_output_file) help(argv[0]); -- cgit v0.10.1