Skip to content

Commit

Permalink
added a modulepath option where the created files will be stored. Thi…
Browse files Browse the repository at this point in the history
…s is useful for using puppet standalone with a local module directory

'
  • Loading branch information
jedi4ever authored and jamtur01 committed Dec 6, 2010
1 parent 2e8b1bf commit 1dbf249
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bin/scaffold
Expand Up @@ -27,6 +27,11 @@ optparse = OptionParser.new do |opts|
options[:template] = template
end

options[:modulepath] = nil
opts.on( '-m', '--modulepath=DIRECTORY', 'Location to store the files created') do |modulepath|
options[:modulepath] = File.expand_path(modulepath)
end

opts.separator ""
opts.separator "Common options:"

Expand Down Expand Up @@ -65,7 +70,11 @@ if options[:template] == 'puppet'
dir = Puppet[:confdir]
end
else
dir = Puppet[:modulepath].split(':')
if options[:modulepath]
dir = options[:modulepath]
else
dir = Puppet[:modulepath].split(':')
end
end

# Add generator name to ARGV
Expand Down

0 comments on commit 1dbf249

Please sign in to comment.