Created
March 14, 2009 18:42
-
-
Save altamic/79142 to your computer and use it in GitHub Desktop.
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
#! /bin/bash | |
# erb2haml | |
# by Michelangelo Altamore | |
# Obtains a file list having an html.erb extension | |
# under the current dir and convert each file | |
# to haml format with html.haml extension. | |
# It requires haml gem. | |
for erb_file in `find . -name *.html.erb`; do | |
if [ -f $erb_file ] ; then | |
name=${erb_file%\.html.erb}; | |
html2haml -e ${erb_file} > ${name}.html.haml; | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment