]> git.phdru.name Git - phdru.name/phdru.name.git/blob - make-files
TODO: проставить в блоге ссылки на пред./след. посты
[phdru.name/phdru.name.git] / make-files
1 #! /bin/sh
2
3 umask 022
4 PYTHONPATH=.
5 export PYTHONPATH
6
7 if [ phd_site.tmpl -nt phd_site.py ]; then
8    cheetah compile --nobackup phd_site.tmpl && compyle phd_site.py
9 fi &&
10
11 for tmpl in "$@"; do
12    dir="`dirname \"$tmpl\"`"
13    outfile="`basename \"$tmpl\" .tmpl`.html"
14    echo "$tmpl => $dir/$outfile"
15    cheetah fill --nobackup --stdout "$tmpl" | iconv -f utf-8 >"$dir/$outfile" || exit 1
16 done