tweak installer

This commit is contained in:
John Bintz 2010-04-02 11:49:49 -04:00
parent 6bcdbdcd7f
commit 2fd9fd8752

View File

@ -11,7 +11,7 @@ class Installer
@dest_dir = dest_dir @dest_dir = dest_dir
end end
def self.go(dest_dir) def self.go(dest_dir, &block)
installer = Installer.new(dest_dir) installer = Installer.new(dest_dir)
installer.instance_eval &block installer.instance_eval &block
end end
@ -30,7 +30,7 @@ class Installer
File.join(@dest_dir, *dest) File.join(@dest_dir, *dest)
end end
def self.paths_to_a(*paths) def paths_to_a(*paths)
paths.collect do |path| paths.collect do |path|
if path.kind_of? String if path.kind_of? String
path = path.split('/') path = path.split('/')
@ -80,6 +80,7 @@ else
mkdir %w{content actions views scripts styles lib config} mkdir %w{content actions views scripts styles lib config}
copy 'lib/trivial.php' copy 'lib/trivial.php'
copy 'config/trivial.inc'
copy 'dist/htaccess.dist', '.htaccess' copy 'dist/htaccess.dist', '.htaccess'
copy 'views/application.inc' copy 'views/application.inc'
copy 'content/index.html' copy 'content/index.html'