export PYTHONPATH
if [ phd_site.tmpl -nt phd_site.py ]; then
- cheetah compile --nobackup phd_site.tmpl
-fi
+ cheetah compile --nobackup phd_site.tmpl && compyle phd_site.py
+fi &&
-exec cheetah fill --nobackup "$@"
+for tmpl in "$@"; do
+ dir="`dirname \"$tmpl\"`"
+ outfile="`basename \"$tmpl\" .tmpl`.html"
+ echo "$tmpl => $dir/$outfile"
+ cheetah fill --nobackup --stdout "$tmpl" | iconv -f utf-8 >"$dir/$outfile" || exit 1
+done