Commit 665c0fed7a987ee1c62ee7cf83a0ba8191ac06fe
- Date: Mon May 12 04:59:34 +0000 2008
- Committer: vann (vann@innerfusion.net)
- Author: vann (vann@innerfusion.net)
- Commit SHA1: 665c0fed7a987ee1c62ee7cf83a0ba8191ac06fe
- Tree SHA1: 8f4f490aca3825c52184bd1c2dcf74825dc97a28
decided to us rsync instead of cp, since it is easier to ignore .svn files
Commit diff
| |   |
| 1 | require 'fileutils' |
| 1 | 2 | TINYMCE_PATH = File.join(RAILS_ROOT, "vendor/plugins/tinymce") |
| 2 | 3 | |
| 3 | 4 | namespace :tinymce do |
| 4 | 5 | |
| 5 | 6 | desc 'Copy all files need for tinymce' |
| 6 | 7 | task :install do |
| 7 | | js_path = File.join(TINYMCE_PATH, "javascripts/") |
| 8 | | system("cp -r #{js_path}/tinymce/jscripts/* #{RAILS_ROOT}/public/javascripts/") |
| 8 | tinymce_path = File.join(TINYMCE_PATH, "javascripts/tinymce/jscripts/*") |
| 9 | js_path = File.join(RAILS_ROOT,"public/javascripts/") |
| 10 | |
| 11 | # using rsync -aC copies ignores the svn files |
| 12 | system("rsync -aC #{tinymce_path} #{js_path}") |
| 13 | |
| 9 | 14 | puts "Tiny MCE Files have been installed successfully" |
| 10 | 15 | end |
| 11 | 16 | |
| toggle raw diff |
--- a/tasks/tinymce_tasks.rake
+++ b/tasks/tinymce_tasks.rake
@@ -1,11 +1,16 @@
+require 'fileutils'
TINYMCE_PATH = File.join(RAILS_ROOT, "vendor/plugins/tinymce")
namespace :tinymce do
desc 'Copy all files need for tinymce'
task :install do
- js_path = File.join(TINYMCE_PATH, "javascripts/")
- system("cp -r #{js_path}/tinymce/jscripts/* #{RAILS_ROOT}/public/javascripts/")
+ tinymce_path = File.join(TINYMCE_PATH, "javascripts/tinymce/jscripts/*")
+ js_path = File.join(RAILS_ROOT,"public/javascripts/")
+
+ # using rsync -aC copies ignores the svn files
+ system("rsync -aC #{tinymce_path} #{js_path}")
+
puts "Tiny MCE Files have been installed successfully"
end
|