apache-config-generator/bin/apache-configurator

18 lines
376 B
Plaintext
Raw Normal View History

2010-05-06 15:05:24 +00:00
#!/usr/bin/env ruby
require 'fileutils'
2010-09-15 22:31:29 +00:00
if !ARGV[0]
puts "Directory name required."
exit 1
end
if File.directory?(ARGV[0])
2010-05-06 15:05:24 +00:00
puts "You can't overwrite an existing directory."
exit 1
end
FileUtils.cp_r File.expand_path(File.join(File.dirname(__FILE__), '..', 'skel')), ARGV[0]
FileUtils.mkdir_p File.join(ARGV[0], 'source')
FileUtils.mkdir_p File.join(ARGV[0], 'conf.d')