require "manual_relocator"
require "logger"

desc <<-EndDesc
Relocate manual from <from-slug> to <to-slug>
Both <from-slug> and <to-slug> need to be published manuals
EndDesc
task :relocate_manual, [:from_slug, :to_slug] => :environment do |_, args|
  ManualRelocator.move(args[:from_slug], args[:to_slug])
end

Add Rake task to relocate manuals
Add Rake task to relocate manuals

I don't fully understand the use case for this script but we've agreed
to wrap it in a Rake task to prevent us from removing it in future. We
tried to remove it in PR #878 but @h-lame pointed out that it might
still be useful for certain support requests that come in.

Note that commit 21fcb3f971510b3765b51128694a9b73f9c6a766 changed the
behaviour of this utility so that both manuals had to be published
before you could move one to the other. This seems slightly confusing to
me as I think it means that the script essentially overwrites one manual
with the other.
