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:
parent
84acb6d1ca
commit
cc4da0210d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user