Skip to content

Instantly share code, notes, and snippets.

@samanthamjohn
Created March 27, 2011 18:27
Show Gist options
  • Save samanthamjohn/889435 to your computer and use it in GitHub Desktop.
Save samanthamjohn/889435 to your computer and use it in GitHub Desktop.
Bash script to convert .erb to haml, adapted from: http://shifteleven.com/articles/2008/06/08/converting-erb-to-haml-snippet
find . -name '*erb' | \
xargs ruby -e 'ARGV.each { |i| puts "html2haml -r #{i} #{i.sub(/erb$/,"haml")}"}' | \
bash
find . -name '*erb' | \
xargs ruby -e 'ARGV.each { |i| puts "rm #{i}"}' | \
bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment