aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-11-07 18:09:31 +0000
committerJamis Buck <jamis@37signals.com>2005-11-07 18:09:31 +0000
commitc2eb22e5c69caba0f9eeb5b95558837d0d572f44 (patch)
tree9887f9092d8ead7369bca04ef5518b261408142f /railties
parent63e30a5cae7140742059804998371f4e0596f549 (diff)
downloadrails-c2eb22e5c69caba0f9eeb5b95558837d0d572f44.tar.gz
rails-c2eb22e5c69caba0f9eeb5b95558837d0d572f44.tar.bz2
rails-c2eb22e5c69caba0f9eeb5b95558837d0d572f44.zip
Add 'add_new_scripts' rake task for adding new rails scripts to script/*
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2926 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/bin/lighttpd3
-rw-r--r--railties/lib/tasks/framework.rake19
3 files changed, 21 insertions, 3 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 0c651eb869..2d21ab60b2 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Add 'add_new_scripts' rake task for adding new rails scripts to script/* [Jamis Buck]
+
* Remove bogus hyphen from script/process/reaper calls to 'ps'. #2767 [anonymous]
* Copy lighttpd.conf when it is first needed, instead of on app creation [Jamis Buck]
diff --git a/railties/bin/lighttpd b/railties/bin/lighttpd
deleted file mode 100644
index b4cbe53d8a..0000000000
--- a/railties/bin/lighttpd
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/local/bin/ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/lighttpd' \ No newline at end of file
diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake
index 2c1d8fc451..dd41873c84 100644
--- a/railties/lib/tasks/framework.rake
+++ b/railties/lib/tasks/framework.rake
@@ -50,3 +50,22 @@ desc "Unlock this application from freeze of gems or edge and return to a fluid
task :unfreeze_rails do
rm_rf "vendor/rails"
end
+
+desc "Add new scripts to the application script/ directory"
+task :add_new_scripts do
+ local_base = "script"
+ edge_base = "#{File.dirname(__FILE__)}/../../bin"
+
+ local = Dir["#{local_base}/**/*"].reject { |path| File.directory?(path) }
+ edge = Dir["#{edge_base}/**/*"].reject { |path| File.directory?(path) }
+
+ edge.each do |script|
+ base_name = script[(edge_base.length+1)..-1]
+ next if base_name == "rails"
+ next if local.detect { |path| base_name == path[(local_base.length+1)..-1] }
+ if !File.directory?("#{local_base}/#{File.dirname(base_name)}")
+ mkdir_p "#{local_base}/#{File.dirname(base_name)}"
+ end
+ install script, "#{local_base}/#{base_name}", :mode => 0655
+ end
+end \ No newline at end of file