Skip to content

Instantly share code, notes, and snippets.

@sashich
Created February 10, 2013 14:29
Show Gist options
  • Save sashich/4749748 to your computer and use it in GitHub Desktop.
Save sashich/4749748 to your computer and use it in GitHub Desktop.
guard :shell do
SOURCE = "/var/records/source"
DESTINATION = "/var/records/dest"
watch %r{^(.*)\.wav$} do |m|
`lame -b 32 --resample 8 -a #{SOURCE}/#{m[1]}.wav #{DESTINATION}/#{m[1]}.mp3`
end
ignore %r{^in-(.*)\.wav$}, %r{^out-(.*)\.wav$}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment