11 git for-each-ref 'refs/remotes' | grep -vE ' refs/remotes/([^/]*/HEAD|.*/archived/.*)$'
16 sed -e 's/&/\&/g; s/</</g; s/>/>/g'
27 if [ -n "$repo" ]; then
31 filename=`echo -n "$name" | tr -c 'A-Za-z0-9' '_'`.rss
32 outfilename="$outdir/$filename"
33 branch=`echo -n "$branch" | escape_html`
34 repo=`echo -n "$repo" | escape_html`
36 if ! [ -f "$outfilename" ]; then
37 datetime=`date --rfc-2822`
38 cat >"$outfilename" <<EOF
39 <?xml version="1.0" encoding="UTF-8" ?>
40 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
42 <title>XonCW: $name</title>
43 <link>http://git.xonotic.org/</link>
44 <description>Xonotic Conflict Watch for branches by $name</description>
46 <atom:link href="http://de.git.xonotic.org/conflicts/$filename" rel="self" type="application/rss+xml" />
47 <lastBuildDate>$datetime</lastBuildDate>
50 cat >>"$outfilename" <<EOF
52 <title>$branch$repo ($hash)</title>
53 <link>http://git.xonotic.org/?p=xonotic/netradiant.git;a=shortlog;h=refs/heads/$name/$branch</link>
54 <guid isPermaLink="false">http://de.git.xonotic.org/conflicts/$filename#$hash-$masterhash</guid>
55 <description><![CDATA[
58 echo -n "<pre>" >>"$outfilename"
59 escape_html >>"$outfilename"
60 echo "</pre>" >>"$outfilename"
62 cat >>"$outfilename" <<EOF
70 datetime=`date --rfc-2822`
71 sed -i -e '/<lastBuildDate>/,$d' "$1"
73 <lastBuildDate>$datetime</lastBuildDate>
85 if [ -z "$outdir" ]; then
91 repo=`git config remote.origin.url | cut -d / -f 4-`
101 for f in "$outdir"/*; do
102 [ -f "$f" ] || continue
107 for f in "$outdir"/*; do
108 [ -f "$f" ] || continue
115 if [ -n "$repodir" ]; then
122 if [ -n "$repodir" ]; then
126 ) | while read -r HASH TYPE REFNAME; do
127 echo >&2 -n "$repodir $REFNAME..."
130 if [ -n "$repodir" ]; then
133 git reset --hard "$masterhash" >/dev/null 2>&1
134 if out=`git merge --no-commit -- "$REFNAME" 2>&1`; then
140 git reset --hard "$masterhash" >/dev/null 2>&1
143 if [ -n "$out" ]; then
144 b=${REFNAME#refs/remotes/[^/]*/}
153 echo "$out" | to_rss "$outdir" "$n" "$masterhash" "$HASH" "$b" "$repo"
161 echo "Usage: $0 --init OUTDIR"
162 echo " $0 --add OUTDIR [REPODIR]"
163 echo " $0 --finish OUTDIR"