bin/image_optim in image_optim-0.11.0 vs bin/image_optim in image_optim-0.11.1
- old
+ new
@@ -1,11 +1,10 @@
#!/usr/bin/env ruby
# encoding: UTF-8
require 'image_optim/runner'
-args = ARGV.dup
options = {}
option_parser = OptionParser.new do |op|
op.accept(ImageOptim::TrueFalseNil, OptionParser.top.atype[TrueClass][0].merge('nil' => nil)){ |arg, val| val }
@@ -95,9 +94,15 @@
exit
end
end
begin
+ args = ARGV.dup
+
+ if args == %w[-v]
+ args = %w[--version]
+ end
+
option_parser.parse!(args)
ImageOptim::Runner.run!(args, options) or exit 1
rescue OptionParser::ParseError => e
abort "#{e.to_s}\n\n#{option_parser.help}"
rescue => e