X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=make-files;h=e5aa6d5d123e5ffbe3ec4860484ff86c8e771bcc;hb=331965859222bca39a7fc251cdc93830620c8a4a;hp=43b9c010a906db3b865585030a28d7c519214ee8;hpb=6aa7ab00b5dc30b6221d0d55fecc1b0b957cdd79;p=phdru.name%2Fphdru.name.git diff --git a/make-files b/make-files index 43b9c01..e5aa6d5 100755 --- a/make-files +++ b/make-files @@ -2,10 +2,19 @@ umask 022 PYTHONPATH=. -export PYTHONPATH +PYTHONIOENCODING=koi8-r:replace +export PYTHONPATH PYTHONIOENCODING -if [ phd_pp_ru.tmpl -nt phd_pp_ru.py ]; then - cheetah compile --nobackup phd_pp_ru.tmpl -fi +if [ phd_site.tmpl -nt phd_site.py ]; then + cheetah compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup phd_site.tmpl && + compyle phd_site.py +fi && + +for tmpl in "$@"; do + dir="`dirname \"$tmpl\"`" + outfile="`basename \"$tmpl\" .tmpl`.html" + echo "$tmpl => $dir/$outfile" + cheetah fill --encoding=koi8-r --settings='encoding="koi8-r"' \ + --nobackup --stdout "$tmpl" | iconv -f utf-8 -t koi8-r >"$dir/$outfile" || exit 1 +done -exec cheetah fill --nobackup "$@"