aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorLuke Armstrong <me@lukearmstrong.co.uk>2011-07-28 00:22:57 +0200
committerLuke Armstrong <me@lukearmstrong.co.uk>2011-07-28 00:22:57 +0200
commit6244feae227162ed24e89e4f247528b67136e3fd (patch)
treefd1883b989b755fe0853699f42142bb9ab7767bd /Rakefile
parentb7a9e1e993e3e62768aa579c1302b316b2f8ffbf (diff)
downloadmy_new_personal_website-6244feae227162ed24e89e4f247528b67136e3fd.tar.xz
my_new_personal_website-6244feae227162ed24e89e4f247528b67136e3fd.zip
Fixed rake update_source and rake update_style
Diffstat (limited to '')
-rw-r--r--Rakefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index addc6888..f9721eb1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -127,6 +127,10 @@ end
desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom"
task :update_style, :theme do |t, args|
theme = args.theme || 'classic'
+ if File.directory?("sass.old")
+ puts "removed existing sass.old directory"
+ system "rm -r sass.old"
+ end
system "mv sass sass.old"
puts "## Moved styles into sass.old/"
system "mkdir -p sass; cp -R #{themes_dir}/"+theme+"/sass/* sass/"
@@ -137,6 +141,10 @@ end
desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation"
task :update_source, :theme do |t, args|
theme = args.theme || 'classic'
+ if File.directory?("#{source_dir}.old")
+ puts "removed existing #{source_dir}.old directory"
+ system "rm -r #{source_dir}.old"
+ end
system "mv #{source_dir} #{source_dir}.old"
puts "moved #{source_dir} into #{source_dir}.old/"
system "mkdir -p #{source_dir}; cp -R #{themes_dir}/"+theme+"/source/. #{source_dir}"