r13560 - /scripts/takeover-for-pkg-perl.sh

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sat Jan 26 07:58:56 UTC 2008


Author: dmn
Date: Sat Jan 26 07:58:56 2008
New Revision: 13560

URL: http://svn.debian.org/wsvn/?sc=1&rev=13560
Log:
"gone pro". support multiple listed packages; add -h option showung usage; add -m option to add pointer to the mail requesting takeover; add -t option to point to checked out trunk

Modified:
    scripts/takeover-for-pkg-perl.sh

Modified: scripts/takeover-for-pkg-perl.sh
URL: http://svn.debian.org/wsvn/scripts/takeover-for-pkg-perl.sh?rev=13560&op=diff
==============================================================================
--- scripts/takeover-for-pkg-perl.sh (original)
+++ scripts/takeover-for-pkg-perl.sh Sat Jan 26 07:58:56 2008
@@ -2,14 +2,67 @@
 
 set -e -u
 
+usage() {
+    BN=`basename $0`
+    cat <<EOF
+Usage: $BN [options] package...
+
+Options:
+    -h      show this text
+    -s      SVN trunk URL (default $SVN)
+    -t      Location of checked out SVN trunk
+    -m      URL to a message in which the previous maintainer requests the
+            takeover
+
+<package> is the source package name that we take over of. You may list more
+than one package.
+EOF
+    exit 0
+}
+
 SVN='svn+ssh://svn.debian.org/svn/pkg-perl'
+TRUNK=''
+MAIL=''
+
+while getopts t:s:m:h o; do
+    case $o in
+        h) usage;;
+        m) MAIL=$OPTARG;;
+        t) TRUNK=$OPTARG;;
+        s) SVN=$OPTARG;;
+    esac
+done
+shift `expr $OPTIND - 1`
 
 TMP=`mktemp -d`
 
-trap "cd /; rmdir -rf $TMP" QUIT INT 0
+trap "cd /; rm -rf $TMP" QUIT INT 0
 
 cd $TMP
 
-apt-get source -d $1
+inject_package()
+{
+    apt-get source -d $1
 
-svn-inject -l 2 -c0 *.dsc $SVN
+    svn-inject -l 2 -c0 *.dsc $SVN
+
+    svn up $TRUNK
+
+    TXT="Take over for the Debian Perl Group"
+    if [ -n "$MAIL" ]; then
+        TXT="$TXT on maintainer's request\n$MAIL"
+    fi
+
+    dch -i -c $TRUNK/$1/debian/changelog "$TXT"
+
+    rm *
+}
+
+[ -n "${1:-}" ] || usage
+
+while [ -n "${1:-}" ]; do
+    inject_package $1
+    shift
+done
+
+




More information about the Pkg-perl-cvs-commits mailing list