shithub: werc

Download patch

ref: 0d3467caf06311dc8b827ced870271743ae12763
parent: 831f5ae93c3ddaf23aa33275e7a188229c458c89
author: uriel <uriel@engel.se.cat-v.org>
date: Mon Jun 18 01:30:46 EDT 2007

Silence some silly 'broken pipe' errors

--- a/pub/sitemap.tpl
+++ b/pub/sitemap.tpl
@@ -30,7 +30,7 @@
             # H1 is not reliable because htmlroff doesn't use it :(
             #desc = `{ cat $i.html |sed 32q | grep '<[Hh]1>' |sed 's/<[Hh]1>(.*)(<\/[Hh]1>|$)/\1/;s/<[^>]*>//g;1q'  } 
             # Pick the first line of body  instead
-            desc = `{ cat $i.html |/bin/sed '0,/<[Bb][Oo][Dd][Yy]/d;s/<[^>]*>//g;/^$/d'|sed 1q }
+            desc = `{ /bin/sed -e '0,/<[Bb][Oo][Dd][Yy]/d;s/<[^>]*>//g;/^$/d' < $i.html >[2]/dev/null | sed 1q }
         }
         if (! ~ $desc '')
             desc = ' - '$"desc