aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-09-02 17:24:42 -0500
committerBrandon Mathis <brandon@imathis.com>2011-09-02 17:24:42 -0500
commit724fd1dbc82e3dd15ba6811e27a9259733fb66b9 (patch)
tree2b06c920b3984bcfa79c3f48413943754b023d80
parentbd44056045af5990f5e65d0d7dd3edcc5c526b70 (diff)
downloadmy_new_personal_website-724fd1dbc82e3dd15ba6811e27a9259733fb66b9.tar.xz
my_new_personal_website-724fd1dbc82e3dd15ba6811e27a9259733fb66b9.zip
fixed bug where update_source Rake task was not copying over changes from .themes
-rw-r--r--Rakefile12
1 files changed, 5 insertions, 7 deletions
diff --git a/Rakefile b/Rakefile
index 702292a8..2c8b444d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -173,15 +173,13 @@ desc "Move source to source.old, install source theme updates, replace source/_i
task :update_source, :theme do |t, args|
theme = args.theme || 'classic'
if File.directory?("#{source_dir}.old")
- puts "removed existing #{source_dir}.old directory"
+ puts "## Removed existing #{source_dir}.old directory"
rm_r "#{source_dir}.old", :secure=>true
end
- mv source_dir, "#{source_dir}.old"
- puts "moved #{source_dir} into #{source_dir}.old/"
- mkdir_p source_dir
- cp_r "#{themes_dir}/"+theme+"/source/.", source_dir
- cp_r "#{source_dir}.old/.", source_dir, :preserve=>true
- cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/"
+ cp_r "#{source_dir}/.", "#{source_dir}.old"
+ puts "## Copied #{source_dir} into #{source_dir}.old/"
+ cp_r "#{themes_dir}/"+theme+"/source/.", source_dir, :remove_destination=>true
+ cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/", :remove_destination=>true
mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir
cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir
puts "## Updated #{source_dir} ##"