Skip to content

Instantly share code, notes, and snippets.

@jonkarna
Created May 25, 2011 14:17
Show Gist options
  • Save jonkarna/991061 to your computer and use it in GitHub Desktop.
Save jonkarna/991061 to your computer and use it in GitHub Desktop.
Rake task for copying an updated flash file and resources
require 'ftools'
SPOTLIGHT_REGEX = "Z:/Active Projects/ASI JetCenter/FlashSpotlight/[^.]*.swf"
SPOTLIGHT_Z = Dir.glob SPOTLIGHT_REGEX
SPOTLIGHT_WEB = "flash/newjets.swf"
file SPOTLIGHT_WEB => SPOTLIGHT_Z do
if SPOTLIGHT_Z.length > 1
puts "Error: more than one files found that match regex"
puts " - " + SPOTLIGHT_REGEX
else
FileUtils.cp SPOTLIGHT_Z[0], SPOTLIGHT_WEB
puts "copied " + File.basename(SPOTLIGHT_Z[0]) + " to " + File.basename(SPOTLIGHT_WEB)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment