Make .txt actually work

This commit is contained in:
Uriel 2008-06-18 21:12:41 +02:00
parent 4dca274f37
commit d0855259a1

View file

@ -95,10 +95,11 @@ fn genbody {
} }
if not if ( test -f $body.tpl ) if not if ( test -f $body.tpl )
template.awk $body.tpl | rc $rcargs template.awk $body.tpl | rc $rcargs
if not if ( test -f $body.txt ) if not if ( test -f $body.txt ) {
echo '<pre>' echo '<pre>'
cat $body.txt |fmt -j| sed 's/\</&gt;/' 's/\>/&lt;/' cat $body.txt |fmt -l 82 -j | sed 's/</\&gt;/g; s/>/\&lt;/g'
echo '</pre>' echo '</pre>'
}
if not if ( test -f $body.html ) if not if ( test -f $body.html )
cat $body.html | /bin/sed '0,/<[Bb][Oo][Dd][Yy][^>]*>/d; /<\/[Bb][Oo][Dd][Yy]>/,$d' cat $body.html | /bin/sed '0,/<[Bb][Oo][Dd][Yy][^>]*>/d; /<\/[Bb][Oo][Dd][Yy]>/,$d'
if not if (~ $body *.html && test -f $body ) if not if (~ $body *.html && test -f $body )