diff options
Diffstat (limited to 'editor/ppmquant')
-rwxr-xr-x | editor/ppmquant | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/editor/ppmquant b/editor/ppmquant index 57963982..fe8ca046 100755 --- a/editor/ppmquant +++ b/editor/ppmquant @@ -35,6 +35,19 @@ exec perl -w -x -S -- "$0" "$@" use strict; +sub doVersionHack($) { + my ($argvR) = @_; + + my $arg1 = $argvR->[0]; + + if (defined($arg1) && (($arg1 eq "--version") || ($arg1 eq "-version"))) { + my $termStatus = system('pnmquant', '--version'); + exit($termStatus == 0 ? 0 : 1); + } +} + +doVersionHack(\@ARGV); + use Getopt::Long; my @ppmquantArgv = @ARGV; |