Enable alternative configuration file.
This commit is contained in:
parent
988e9324ea
commit
f218ac685f
1 changed files with 6 additions and 5 deletions
|
@ -85,16 +85,18 @@ class Baguette::Configuration
|
||||||
OptionParser.parse do |parser|
|
OptionParser.parse do |parser|
|
||||||
parser.banner = "usage: #{PROGRAM_NAME} [-ns][--project project-name]"
|
parser.banner = "usage: #{PROGRAM_NAME} [-ns][--project project-name]"
|
||||||
|
|
||||||
parser.on "-s", "--simulation",
|
parser.on "-s", "--simulation", "Print configuration then quit." do
|
||||||
"Print configuration then quit." do
|
|
||||||
simulation = true
|
simulation = true
|
||||||
end
|
end
|
||||||
|
|
||||||
parser.on "-n", "--no-configuration",
|
parser.on "-n", "--no-configuration", "No configuration file should be read." do
|
||||||
"No configuration file should be read." do
|
|
||||||
no_configuration = true
|
no_configuration = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
parser.on "--configuration file", "Configuration file to use." do |f|
|
||||||
|
configuration_file = f
|
||||||
|
end
|
||||||
|
|
||||||
parser.on "-v verbosity", "--verbosity level",
|
parser.on "-v verbosity", "--verbosity level",
|
||||||
"Verbosity level. From 0 to 4. Default: 4" do |v|
|
"Verbosity level. From 0 to 4. Default: 4" do |v|
|
||||||
Baguette::Context.verbosity = v.to_i
|
Baguette::Context.verbosity = v.to_i
|
||||||
|
@ -110,7 +112,6 @@ class Baguette::Configuration
|
||||||
end
|
end
|
||||||
|
|
||||||
parser.on "-h", "--help", "Show this help" do
|
parser.on "-h", "--help", "Show this help" do
|
||||||
Baguette::Log.warning "for the first option parsing!"
|
|
||||||
puts parser
|
puts parser
|
||||||
help = true
|
help = true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue