Created
December 8, 2011 22:05
-
-
Save stoplion/1448859 to your computer and use it in GitHub Desktop.
Bash script to convert Haml to Slim
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 | |
file_dir='/Users/geoneo/Sites/orion/app/views' | |
for i in `find ${file_dir} -maxdepth 3 -type f -name "*.haml" ! -empty` | |
do | |
output_dir=`dirname $i` | |
new_file=`basename ${i} | sed 's/\(.*\.\)haml/\1slim/'` | |
haml2slim ${i} ${output_dir}/${new_file} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment