Merge pull request #456 from henrikbrixandersen/version

Add --version argument
This commit is contained in:
Alessandro Ranellucci 2012-06-17 08:34:31 -07:00
commit cde9f509d5
2 changed files with 3 additions and 0 deletions

View File

@ -76,6 +76,7 @@ The author is Alessandro Ranellucci.
Usage: slic3r.pl [ OPTIONS ] file.stl Usage: slic3r.pl [ OPTIONS ] file.stl
--help Output this usage screen and exit --help Output this usage screen and exit
--version Output the version of Slic3r and exit
--save <file> Save configuration to the specified file --save <file> Save configuration to the specified file
--load <file> Load configuration from the specified file. It can be used --load <file> Load configuration from the specified file. It can be used
more than once to load options from multiple files. more than once to load options from multiple files.

View File

@ -17,6 +17,7 @@ my %cli_options = ();
{ {
my %options = ( my %options = (
'help' => sub { usage() }, 'help' => sub { usage() },
'version' => sub { print "$Slic3r::VERSION\n"; exit 0 },
'debug' => \$Slic3r::debug, 'debug' => \$Slic3r::debug,
'gui' => \$opt{gui}, 'gui' => \$opt{gui},
@ -121,6 +122,7 @@ written by Alessandro Ranellucci <aar\@cpan.org> - http://slic3r.org/
Usage: slic3r.pl [ OPTIONS ] file.stl Usage: slic3r.pl [ OPTIONS ] file.stl
--help Output this usage screen and exit --help Output this usage screen and exit
--version Output the version of Slic3r and exit
--save <file> Save configuration to the specified file --save <file> Save configuration to the specified file
--load <file> Load configuration from the specified file. It can be used --load <file> Load configuration from the specified file. It can be used
more than once to load options from multiple files. more than once to load options from multiple files.