Fixed rake update_source and rake update_style
Brandon Mathis authored on 27/07/2011 at 22:34:16... | ... |
@@ -127,6 +127,10 @@ end |
127 | 127 |
desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom" |
128 | 128 |
task :update_style, :theme do |t, args| |
129 | 129 |
theme = args.theme || 'classic' |
130 |
+ if File.directory?("sass.old") |
|
131 |
+ puts "removed existing sass.old directory" |
|
132 |
+ system "rm -r sass.old" |
|
133 |
+ end |
|
130 | 134 |
system "mv sass sass.old" |
131 | 135 |
puts "## Moved styles into sass.old/" |
132 | 136 |
system "mkdir -p sass; cp -R #{themes_dir}/"+theme+"/sass/* sass/" |
... | ... |
@@ -137,6 +141,10 @@ end |
137 | 137 |
desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation" |
138 | 138 |
task :update_source, :theme do |t, args| |
139 | 139 |
theme = args.theme || 'classic' |
140 |
+ if File.directory?("#{source_dir}.old") |
|
141 |
+ puts "removed existing #{source_dir}.old directory" |
|
142 |
+ system "rm -r #{source_dir}.old" |
|
143 |
+ end |
|
140 | 144 |
system "mv #{source_dir} #{source_dir}.old" |
141 | 145 |
puts "moved #{source_dir} into #{source_dir}.old/" |
142 | 146 |
system "mkdir -p #{source_dir}; cp -R #{themes_dir}/"+theme+"/source/. #{source_dir}" |