...
|
...
|
@@ -173,15 +173,13 @@ desc "Move source to source.old, install source theme updates, replace source/_i
|
173
|
173
|
task :update_source, :theme do |t, args|
|
174
|
174
|
theme = args.theme || 'classic'
|
175
|
175
|
if File.directory?("#{source_dir}.old")
|
176
|
|
- puts "removed existing #{source_dir}.old directory"
|
|
176
|
+ puts "## Removed existing #{source_dir}.old directory"
|
177
|
177
|
rm_r "#{source_dir}.old", :secure=>true
|
178
|
178
|
end
|
179
|
|
- mv source_dir, "#{source_dir}.old"
|
180
|
|
- puts "moved #{source_dir} into #{source_dir}.old/"
|
181
|
|
- mkdir_p source_dir
|
182
|
|
- cp_r "#{themes_dir}/"+theme+"/source/.", source_dir
|
183
|
|
- cp_r "#{source_dir}.old/.", source_dir, :preserve=>true
|
184
|
|
- cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/"
|
|
179
|
+ cp_r "#{source_dir}/.", "#{source_dir}.old"
|
|
180
|
+ puts "## Copied #{source_dir} into #{source_dir}.old/"
|
|
181
|
+ cp_r "#{themes_dir}/"+theme+"/source/.", source_dir, :remove_destination=>true
|
|
182
|
+ cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/", :remove_destination=>true
|
185
|
183
|
mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir
|
186
|
184
|
cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir
|
187
|
185
|
puts "## Updated #{source_dir} ##"
|