Browse files

replace copy logic with rm logic.

  • Loading branch information...
1 parent 6653d05 commit f942e9643796881c2fec1ca701050a7b1c7b329e @parndt parndt committed Jul 23, 2010
Showing with 4 additions and 6 deletions.
  1. +4 −6 vendor/plugins/refinery/lib/tasks/refinery.rake
View
10 vendor/plugins/refinery/lib/tasks/refinery.rake
@@ -111,10 +111,6 @@ namespace :refinery do
FileUtils::rm_rf File.join(Rails.root, asset), :secure => true, :verbose => verbose # ensure the destination is clear.
FileUtils::cp_r File.join(Refinery.root, asset), File.join(Rails.root, asset), :verbose => verbose # copy the new assets into the project.
end
-
- if Rails.root.join('lib', 'refinery').directory?
- FileUtils::rm_rf Rails.root.join('lib', 'refinery').cleanpath.to_s, :secure => true, :verbose => verbose
- end
# copy in any new migrations.
FileUtils::cp Dir[Refinery.root.join("db", "migrate", "*.rb").cleanpath.to_s], Rails.root.join("db", "migrate").cleanpath.to_s, :verbose => verbose
@@ -163,8 +159,10 @@ namespace :refinery do
# replace the config.ru file
FileUtils::cp Refinery.root.join('config.ru').cleanpath.to_s, Rails.root.join('config.ru').cleanpath.to_s, :verbose => verbose
- # copy the lib/refinery directory in
- FileUtils::cp_r Refinery.root.join("lib", "refinery").cleanpath.to_s, Rails.root.join("lib").cleanpath.to_s, :verbose => verbose
+ # destroy any lib/refinery directory that we don't need anymore.
+ if Rails.root.join('lib', 'refinery').directory?
+ FileUtils::rm_rf Rails.root.join('lib', 'refinery').cleanpath.to_s, :secure => true, :verbose => verbose
+ end
# copy any initializers
Dir[Refinery.root.join('config', 'initializers', '*.rb').to_s].each do |initializer|

0 comments on commit f942e96

Please sign in to comment.