repo=" in $repo"
fi
- filename=`echo -n "$name" | tr -c 'A-Za-z0-9' '_'`.xml
+ filename=`echo -n "$name" | tr -c 'A-Za-z0-9' '_'`.rss
outfilename="$outdir/$filename"
datetime=`date --rfc-2822`
branch=`echo "$branch" | escape_html`
EOF
}
+clear_rss()
+{
+ sed -i -e '/<item>/,$d' "$1"
+}
+
finish_rss()
{
cat <<EOF >>"$1"
case "$action" in
--init)
- rm -rf "$outdir"
mkdir -p "$outdir"
+ for f in "$outdir"/*; do
+ [ -f "$f" ] || continue
+ clear_rss "$f"
+ done
;;
--finish)
for f in "$outdir"/*; do