Added the --version commandline parameter.
This commit is contained in:
parent
654a04f401
commit
e0bcda0cf3
10
rubberin
10
rubberin
|
@ -105,9 +105,10 @@ Version = '0.6'
|
|||
# Determine the compile mode from the options.
|
||||
mode = :dvi
|
||||
opts = GetoptLong.new(
|
||||
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
|
||||
[ "--ps", "-p", GetoptLong::NO_ARGUMENT ],
|
||||
[ "--pdf", "-d", GetoptLong::NO_ARGUMENT ])
|
||||
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
|
||||
[ "--ps", "-p", GetoptLong::NO_ARGUMENT ],
|
||||
[ "--pdf", "-d", GetoptLong::NO_ARGUMENT ],
|
||||
[ "--version", "-v", GetoptLong::NO_ARGUMENT ])
|
||||
opts.ordering = GetoptLong::REQUIRE_ORDER
|
||||
opts.quiet = true
|
||||
opts.each do |opt, arg|
|
||||
|
@ -121,6 +122,9 @@ opts.each do |opt, arg|
|
|||
mode = if mode == :ps then :pspdf
|
||||
else :pdf
|
||||
end
|
||||
when "--version"
|
||||
puts "#{Program} #{Version}"
|
||||
exit 0
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue