]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
Use iconv to convert cheetah-generated HTML from utf-8
authorOleg Broytman <phd@phdru.name>
Sun, 8 Jun 2014 16:58:42 +0000 (20:58 +0400)
committerOleg Broytman <phd@phdru.name>
Wed, 23 Dec 2015 15:54:09 +0000 (18:54 +0300)
make-files

index 589762119111ee83b6a3528c47cff6118a6d8688..ec02398709c5d36f2b2396aa53ccd5ea81745324 100755 (executable)
@@ -8,4 +8,9 @@ if [ phd_site.tmpl -nt phd_site.py ]; then
    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