11 git for-each-ref 'refs/remotes' | grep -vE ' refs/remotes/([^/]*/HEAD|.*/archived/.*)$'
16 sed -e 's/&/\&/g; s/</</g; s/>/>/g'
29 filename=`echo -n "$name" | tr -c 'A-Za-z0-9' '_'`.rss
30 outfilename="$outdir/$filename"
31 masterbranch=`echo -n "$masterbranch" | escape_html`
32 branch=`echo -n "$branch" | escape_html`
33 repo=`echo -n "$repo" | escape_html`
34 if [ -n "$repo" ]; then
40 if ! [ -f "$outfilename" ]; then
41 datetime=`date --rfc-2822`
42 cat >"$outfilename" <<EOF
43 <?xml version="1.0" encoding="UTF-8" ?>
44 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
46 <title>XonCW: $name</title>
47 <link>http://git.xonotic.org/</link>
48 <description>Xonotic Conflict Watch for branches by $name</description>
50 <atom:link href="http://nl.git.xonotic.org/xoncw/$filename" rel="self" type="application/rss+xml" />
51 <lastBuildDate>$datetime</lastBuildDate>
54 cat >>"$outfilename" <<EOF
56 <title>$branch$repotxt</title>
57 <link>http://git.xonotic.org/?p=$repo;a=shortlog;h=refs/heads/$branch</link>
58 <guid isPermaLink="false">http://nl.git.xonotic.org/xoncw/$filename#$hash</guid>
59 <description><![CDATA[
60 Conflicts of $branch at $hash against $masterbranch at $masterhash:
63 echo -n "<pre>" >>"$outfilename"
64 escape_html >>"$outfilename"
65 echo "</pre>" >>"$outfilename"
67 cat >>"$outfilename" <<EOF
75 datetime=`date --rfc-2822`
76 sed -i -e '/<lastBuildDate>/,$d' "$1"
78 <lastBuildDate>$datetime</lastBuildDate>
90 if [ -z "$outdir" ]; then
96 if [ -n "$repodir" ]; then
99 git config remote.origin.url | cut -d / -f 4-
106 for f in "$outdir"/*; do
107 [ -f "$f" ] || continue
112 for f in "$outdir"/*; do
113 [ -f "$f" ] || continue
120 if [ -n "$repodir" ]; then
128 if [ -n "$repodir" ]; then
131 git symbolic-ref HEAD
134 masterbranch=${masterbranch#refs/heads/}
136 if [ -n "$repodir" ]; then
140 ) | while read -r HASH TYPE REFNAME; do
141 echo >&2 -n "$repo $REFNAME..."
144 if [ -n "$repodir" ]; then
147 git reset --hard "$masterhash" >/dev/null 2>&1
148 if out=`git merge --no-commit -- "$REFNAME" 2>&1`; then
154 git reset --hard "$masterhash" >/dev/null 2>&1
157 if [ -n "$out" ]; then
158 b=${REFNAME#refs/remotes/[!/]*/}
167 echo "$out" | to_rss "$outdir" "$n" "$masterhash" "$masterbranch" "$HASH" "$b" "$repo"
175 echo "Usage: $0 --init OUTDIR"
176 echo " $0 --add OUTDIR [REPODIR]"
177 echo " $0 --finish OUTDIR"