20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/geoffrey/cli.rb', line 20
def install(*names)
templates_to_install = []
if options[:remote]
templates_to_install << names.join
else
names.each do |name|
if file = file_for_template(name)
templates_to_install << file
end
end
end
if templates_to_install.empty?
puts "Template not found"
exit 1
else
templates_to_install.each do |template|
package = Geoffrey::Template.new(template).package
package.verbose(true) if options[:verbose]
package.process
end
end
end
|