cookutils diff web/cooker.cgi @ rev 697
cookutils: catch control-c in aufs jail (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 25 11:27:23 2014 +0200 (2014-10-25) |
parents | 5bcc3be62d13 |
children | d81d9cd03f7b |
line diff
1.1 --- a/web/cooker.cgi Mon Oct 13 10:38:41 2014 +0200 1.2 +++ b/web/cooker.cgi Sat Oct 25 11:27:23 2014 +0200 1.3 @@ -35,25 +35,31 @@ 1.4 exit 1.5 fi 1.6 1.7 -echo "Content-Type: text/html" 1.8 +echo -n "Content-Type: " 1.9 +if [ "$QUERY_STRING" == "rss" ]; then 1.10 + echo "application/rss+xml" 1.11 +else 1.12 + echo "text/html; charset=utf-8" 1.13 +fi 1.14 echo "" 1.15 1.16 # RSS feed generator 1.17 if [ "$QUERY_STRING" == "rss" ]; then 1.18 - pubdate=$(date -u "+%a, %d %b %Y %X %Z") 1.19 + pubdate=$(date -R) 1.20 cat << EOT 1.21 <?xml version="1.0" encoding="utf-8" ?> 1.22 -<rss version="2.0"> 1.23 +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 1.24 <channel> 1.25 <title>SliTaz Cooker</title> 1.26 <description>The SliTaz packages cooker feed</description> 1.27 <link>$COOKER_URL</link> 1.28 <lastBuildDate>$pubdate</lastBuildDate> 1.29 <pubDate>$pubdate</pubDate> 1.30 + <atom:link href="http://cook.slitaz.org/cooker.cgi?rss" rel="self" type="application/rss+xml" /> 1.31 EOT 1.32 for rss in $(ls -lt $FEEDS/*.xml | head -n 12) 1.33 do 1.34 - cat $rss 1.35 + cat $rss | sed 's|<guid|& isPermaLink="false"|g;s|</pubDate| GMT&|g' 1.36 done 1.37 cat << EOT 1.38 </channel>