Created
August 26, 2011 20:28
-
-
Save edavis10/1174358 to your computer and use it in GitHub Desktop.
watchr file to auto build my docbook PDF
This file contains hidden or 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
@auto_generated_files = [ | |
"xsl/fo.xml" | |
] | |
watch("(.*.[xml|xsl])") {|m| rebuild(m[1]) unless @auto_generated_files.include?(m[1]) } | |
def rebuild(file_change) | |
puts "[watchr] Rebuilding because #{file_change} changed" | |
system("rake") | |
puts "[watchr] Waiting for changes" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment