1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #661: Add version option

This commit is contained in:
Daniel Molina 2011-06-13 16:38:36 +02:00
parent 84acb6d1ca
commit cc4da0210d

View File

@ -30,6 +30,12 @@ module CommandParser
:short => "-h",
:large => "--help",
:description => "Show this message"
},
VERSION={
:name => "version",
:short => "-V",
:large => "--version",
:description => "Show version and copyright information",
}
]
@ -264,7 +270,9 @@ module CommandParser
e[:proc].call
elsif e[:name]=="help"
help
#puts opts
exit
elsif e[:name]=="version"
puts @version
exit
else
@options[e[:name].to_sym]=o