11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/windclutter/util/file_handler.rb', line 11
def self.init_config
FileUtils.mkdir_p('/tmp/windclutter')
return puts 'Setup already performed!'.yellow if File.file?('/tmp/windclutter/config.yml')
template = File.expand_path('../../template', File.dirname(__FILE__))
puts 'First setup of windclutter...'.green
puts 'Created the following files:'
Dir["#{template}/*.yml"].each do |file|
FileUtils.cp(file, '/tmp/windclutter')
end
Dir['/tmp/windclutter/*'].each do |file|
puts "\t#{file}"
end
puts "\nSetup completed!".green
end
|