Commit b4ffc955 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Create] Allow passing additional args to the configure script

parent 524abbfa
...@@ -18,12 +18,19 @@ module Pod ...@@ -18,12 +18,19 @@ module Pod
self.arguments = [ self.arguments = [
CLAide::Argument.new('NAME', true), CLAide::Argument.new('NAME', true),
CLAide::Argument.new('TEMPLATE_URL', false),
] ]
def self.options
[
['--template-url=URL', 'The URL of the git repo containing a ' \
'compatible template'],
].concat(super)
end
def initialize(argv) def initialize(argv)
@name = argv.shift_argument @name = argv.shift_argument
@template_url = argv.shift_argument @template_url = argv.option('template-url', TEMPLATE_REPO)
@additional_args = argv.remainder
super super
end end
...@@ -72,7 +79,7 @@ module Pod ...@@ -72,7 +79,7 @@ module Pod
UI.section("Configuring #{@name} template.") do UI.section("Configuring #{@name} template.") do
Dir.chdir(@name) do Dir.chdir(@name) do
if File.exist?('configure') if File.exist?('configure')
system("./configure #{@name}") system('./configure', @name, *@additional_args)
else else
UI.warn 'Template does not have a configure file.' UI.warn 'Template does not have a configure file.'
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment