cookutils diff cook @ rev 713

cookall.sh: tzdata in a bdeps loop
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 12 08:44:11 2015 +0100 (2015-03-12)
parents d81d9cd03f7b
children 4aeb98e0ff3c
line diff
     1.1 --- a/cook	Fri Jan 09 13:05:32 2015 +0100
     1.2 +++ b/cook	Thu Mar 12 08:44:11 2015 +0100
     1.3 @@ -954,6 +954,11 @@
     1.4  	exit $status
     1.5  }
     1.6  
     1.7 +# Encode predefined XML entities
     1.8 +xml_ent() {
     1.9 +	sed -e 's|&|\&amp;|g; s|<|\&lt;|g; s|>|\&gt;|g; s|"|\&quot;|g' -e "s|'|\&apos;|g"
    1.10 +}
    1.11 +
    1.12  # Create a XML feed for freshly built packages.
    1.13  gen_rss() {
    1.14  	pubdate=$(date "+%a, %d %b %Y %X")
    1.15 @@ -963,7 +968,7 @@
    1.16  		<link>${COOKER_URL}?pkg=$PACKAGE</link>
    1.17  		<guid>$PACKAGE-$VERSION${EXTRAVERSION}</guid>
    1.18  		<pubDate>$pubdate</pubDate>
    1.19 -		<description>$SHORT_DESC</description>
    1.20 +		<description>$(echo -n "$SHORT_DESC" | xml_ent)</description>
    1.21  	</item>
    1.22  EOT
    1.23  }