summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-03-02 14:40:34 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2013-03-02 18:34:04 +0000
commit4c601227a8fc8a79a1af8401ac6ed602f2a05837 (patch)
tree33f0b654b1fd7ed11f0d14a80e548f61eafe84a9
parentf4155a33731b036e4598bdbf08cb7babab40a10f (diff)
Add utility scripts
-rwxr-xr-xjhbuild_patches_collect23
-rwxr-xr-xjhbuild_repository_configure69
2 files changed, 92 insertions, 0 deletions
diff --git a/jhbuild_patches_collect b/jhbuild_patches_collect
new file mode 100755
index 0000000..0a6f9e4
--- /dev/null
+++ b/jhbuild_patches_collect
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+O=`pwd`/collected-patches
+mkdir -p $O
+rm -f $O/*
+M=`pwd`/checkout
+
+for i in `jhbuild -f jhbuildrc list` ; do
+ D=`jhbuild -f jhbuildrc run --in-checkoutdir=$i -- bash -c 'pwd' 2>/dev/null`
+ D=`echo $D | tr '\n' ' ' `
+ D=${D%% *}
+# echo "$i: $D"
+ if [ "$D" != "$M" ] ; then
+ cd $D
+ git diff --quiet --ignore-submodules || (echo "$i: dirty" && exit 1 ) || exit 1
+ FN=`git format-patch -o $O origin/master`
+ cd - >/dev/null
+ for p in $FN; do
+ echo $p
+ mv $p $O/$i-`basename $p`
+ done
+ fi
+done
diff --git a/jhbuild_repository_configure b/jhbuild_repository_configure
new file mode 100755
index 0000000..f1656fa
--- /dev/null
+++ b/jhbuild_repository_configure
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+for i in `jhbuild -f jhbuildrc list` ; do
+
+ checkoutdir=`jhbuild -f jhbuildrc run --in-checkoutdir=$i -- pwd`
+
+ # unfortunately, jhbuild run also echos the command it ran, so we need to remove that
+ checkoutdir=`echo $checkoutdir | tr '\n' ' ' `
+ checkoutdir=${checkoutdir%% *}
+
+ # metamodules don't have a checkoutdir, so check for .git/config
+ if [ -e "$checkoutdir/.git/config" ]; then
+
+ cd $checkoutdir
+
+ case $i in
+ xserver)
+ EMAIL="xorg-devel@lists.freedesktop.org"
+ SUBJECT="PATCH"
+ ;;
+ libxcb)
+ EMAIL="xcb@lists.freedesktop.org"
+ SUBJECT="PATCH"
+ ;;
+ xcb* | pthread-stubs | proto)
+ EMAIL="xcb@lists.freedesktop.org"
+ SUBJECT="PATCH $i"
+ ;;
+ libGL)
+ EMAIL="mesa-dev@lists.freedesktop.org"
+ SUBJECT="PATCH"
+ ;;
+ mesa-demos)
+ EMAIL="mesa-dev@lists.freedesktop.org"
+ SUBJECT="PATCH mesa-demos"
+ ;;
+ fontconfig)
+ EMAIL="fontconfig@lists.freedesktop.org"
+ SUBJECT="PATCH"
+ ;;
+ xkeyboard-config)
+ EMAIL="" # requests patch submission via bugzilla
+ SUBJECT="PATCH"
+ ;;
+ pixman)
+ EMAIL="pixman@lists.freedesktop.org"
+ SUBJECT="PATCH"
+ ;;
+ *)
+ EMAIL="xorg-devel@lists.freedesktop.org"
+ SUBJECT="PATCH `git config remote.origin.url | sed s#git://anongit.freedesktop.org/git/xorg/##`"
+ ;;
+ esac
+
+ echo "$i: email to $EMAIL with subject $SUBJECT"
+
+ if [ -n "$EMAIL" ]; then
+ git config --replace-all sendemail.to $EMAIL
+ fi
+
+ git config --replace-all format.subjectprefix "$SUBJECT"
+
+ git remote set-url --push origin `git config remote.origin.url | sed s#git://anongit#ssh://git#`
+
+ cd - >/dev/null
+
+ fi
+
+done