Home → WebExportPostflightScript

#!/usr/bin/env ruby

output_dir = ENV['VPWebExportOutputDirectory']

file_path = File.join output_dir, 'index.html'

sz = File.size file_path

contents = ''

File.open file_path, 'r' do |f|

contents = f.read sz

contents.gsub! '<!-- insert apple title here -->', '<meta name="AppleTitle" content="Wii Transfer Help" />'

contents.gsub! '<!-- insert apple icon here -->', '<meta name="AppleIcon" content="Wii Transfer Help/app_icon_16.png" />'

end

File.open file_path, 'w+' do |f|

f.print contents

end

#cmd = "/usr/bin/open -a /Developer/Applications/Utilities/Help\ Indexer.app \"${output_dir}\""

#`osascript -e "tell application \"Terminal\" to do script \"${cmd}\""`