Source

FormAlchemy / tempitification.sh

1
2
3
4
5
6
7
8
9
#!/bin/sh
for i in $(ls *.mako);
do
    echo "$i""_tmpl"
    echo "{{if template_engine == 'mako'}}" > "$i""_tmpl"
    cat $i >> "$i""_tmpl"
    echo "{{endif}}" >> "$i""_tmpl"
    rm "$i"
done