Migrating plugins not in 2.1

This commit is contained in:
Parker Moore 2013-01-06 01:15:34 -05:00
parent 23a72abbf9
commit d5e43b501f
1 changed files with 3 additions and 3 deletions

View File

@ -86,8 +86,6 @@ begin
f.write(deploy_configs.to_yaml)
end
# migrate plugins
# migrate custom themes
custom_themes = Dir.glob(old_octo_dir('.themes', '*')).delete_if { |theme| theme =~ /\.themes\/classic/ }
FileUtils.cp_r custom_themes, new_octo_dir('.themes')
@ -96,7 +94,9 @@ begin
FileUtils.mv old_octo_dir("Rakefile"), new_octo_dir("Rakefile-old")
# migrate updated plugins (but leave deprecated ones)
FileUtils.cp_r new_octo_dir("plugins"), old_octo_dir("plugins")
octopress_plugins = Dir.glob(new_octo_dir('plugins', '*')).map { |path| path.match(/([\w]*\/[\w]*.rb)$/)[1] }
custom_plugins = Dir.glob(old_octo_dir('plugins', '*')).map { |path| path.match(/([\w]*\/[\w]*.rb)$/)[1] } - octopress_plugins
FileUtils.cp_r custom_plugins.map { |rel_path| old_octo_dir(rel_path) }, new_octo_dir('plugins')
# move new to old's location
FileUtils.rm_rf old_octo_dir