[Pkg-haskell-commits] darcs: tools: Add mass-upload script
Joachim Breitner
mail at joachim-breitner.de
Wed Sep 18 17:38:49 UTC 2013
Wed Sep 18 17:38:38 UTC 2013 Joachim Breitner <mail at joachim-breitner.de>
* Add mass-upload script
M ./mass-build.sh -1 +1
A ./mass-upload.sh
Wed Sep 18 17:38:38 UTC 2013 Joachim Breitner <mail at joachim-breitner.de>
* Add mass-upload script
diff -rN -u old-tools/mass-build.sh new-tools/mass-build.sh
--- old-tools/mass-build.sh 2013-09-18 17:38:49.009565141 +0000
+++ new-tools/mass-build.sh 2013-09-18 17:38:49.109547907 +0000
@@ -8,7 +8,7 @@
if [ -z "$schroot" -o -z "$result" -o "$schroot" = '--help' ]
then
- echo "Usage: $0 <results/> dirs..."
+ echo "Usage: $0 <chroot> <results/> dirs..."
echo
echo "Check each directory whether it is marked for release (distribution set) but"
echo "not tagged with the latest version. Those packages will be built with sbuild"
diff -rN -u old-tools/mass-upload.sh new-tools/mass-upload.sh
--- old-tools/mass-upload.sh 1970-01-01 00:00:00.000000000 +0000
+++ new-tools/mass-upload.sh 2013-09-18 17:38:49.113541009 +0000
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+if [ -z "$1" -o "$1" = '--help' ]
+then
+ echo "Usage: $0 repodir/ file.changes file.changes..."
+ echo
+ echo "For each of the changes, will"
+ echo " * sign it"
+ echo " * dput it"
+ echo " * find the appropriate darcs repository in repodir/<sourcename>"
+ echo " * pushes that"
+ echo " * and renames the file to file.changes-done"
+ exit
+fi
+
+repodir=$1
+shift
+
+set -e
+status=0
+
+while [ -n "$1" ]
+do
+ changes=$1
+ shift
+
+ pkg="$(grep-dctrl '' -s Source -n "$changes")"
+
+ if [ ! -d "$repodir/$pkg/_darcs" ]
+ then
+ echo "Skipping $changes, $repodir/$pkg not found or not a darcs repo"
+ continue
+ fi
+
+ debsign "$changes"
+ dput "$changes"
+ darcs push --repo="$repodir/$pkg" -a
+ mv "$changes" "$changes-done"
+
+done
+
+exit $status
More information about the Pkg-haskell-commits
mailing list