Created
May 25, 2011 14:17
-
-
Save jonkarna/991061 to your computer and use it in GitHub Desktop.
Rake task for copying an updated flash file and resources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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