Skip to content

Instantly share code, notes, and snippets.

@edavis10
Created August 26, 2011 20:28
Show Gist options
  • Save edavis10/1174358 to your computer and use it in GitHub Desktop.
Save edavis10/1174358 to your computer and use it in GitHub Desktop.
watchr file to auto build my docbook PDF
@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