def write_manifest(relative_destination)
files = ([relative_destination] + Dir["#{destination_root}/**/*"])
files.reject! { |file| File.directory?(file) }
files.map! { |path| path.sub("#{destination_root}/","") }
files = files.uniq.sort
destination = destination_path(relative_destination)
destination_exists = File.exists?(destination)
if destination_exists
choice = :force
logger.force(relative_destination)
else
logger.create relative_destination
end
return if options[:pretend]
File.open(destination, 'wb') do |dest|
dest.write files.join("\n")
dest.write "\n"
end
system("svn add #{destination}") if options[:svn]
end