lighttpd.conf should use CWD so the config file is portable across systems, bad ulysses! ;)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4000 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson
2006-03-20 06:17:55 +00:00
parent c4d6b8bb3c
commit 925d149b3c

View File

@@ -30,13 +30,14 @@ unless File.exist?(config_file)
puts "=> #{config_file} not found."
exit 1
end
require 'fileutils'
source = File.expand_path(File.join(File.dirname(__FILE__),
"..", "..", "..", "configs", "lighttpd.conf"))
puts "=> #{config_file} not found, copying from #{source}"
config = File.read source
config = config.gsub "CWD", File.expand_path(RAILS_ROOT).inspect
File.open(config_file, 'w') { |f| f.write config }
FileUtils.cp(source, config_file)
end
config = IO.read(config_file)