Skip to content

Instantly share code, notes, and snippets.

@adamstac
Forked from terrbear/gist:347837
Created August 11, 2010 07:24
Show Gist options
  • Save adamstac/518623 to your computer and use it in GitHub Desktop.
Save adamstac/518623 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ -z "$1" ]; then
wdir="."
else
wdir=$1
fi
for f in $( ls $wdir/*.erb ); do
out="${f%.erb}.haml"
if [ -e $out ]; then
echo "skipping $out; already exists"
else
echo "hamlifying $f"
html2haml $f > $out
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment