commit 70030e93b42a912ee957c6f5df4d5f6eb4332431
parent 645e4512670ebf3e4d1152d70a580db760274770
Author: uriel@suckless.org <unknown>
Date: Wed, 18 Jun 2008 21:12:41 +0200
Make .txt actually work
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bin/controller.rc b/bin/controller.rc
@@ -95,10 +95,11 @@ fn genbody {
}
if not if ( test -f $body.tpl )
template.awk $body.tpl | rc $rcargs
- if not if ( test -f $body.txt )
+ if not if ( test -f $body.txt ) {
echo '<pre>'
- cat $body.txt |fmt -j| sed 's/\</>/' 's/\>/</'
+ cat $body.txt |fmt -l 82 -j | sed 's/</\>/g; s/>/\</g'
echo '</pre>'
+ }
if not if ( test -f $body.html )
cat $body.html | /bin/sed '0,/<[Bb][Oo][Dd][Yy][^>]*>/d; /<\/[Bb][Oo][Dd][Yy]>/,$d'
if not if (~ $body *.html && test -f $body )