def handle_options
ARGV.options do |opt|
opt.banner = "#{MYNAME} - show version info for LaTeX class or style file\n"
opt.banner << "Usage: #{MYNAME} [options] filename"
opt.separator ""
opt.on('-d','--dateonly','show file date (yyyy/mm/dd) only') do @dateonly = true end
opt.on('-v','--versiononly','show file version (vn.m) only') do @versiononly = true end
opt.on("-h","--help", "print this help and exit") do
print opt.help
quit
end
opt.on('-V','--version', 'print version and exit') do
print_version(RELEASE)
end
opt.parse!
end or quit("Error parsing options",1)
file = ARGV[0] or quit("#{MYNAME}: need file name")
end