[Python-modules-commits] r17136 - in packages/python-keyczar/trunk/debian (svn-orig-source.sh)

chrisk-guest at users.alioth.debian.org chrisk-guest at users.alioth.debian.org
Tue May 24 21:58:23 UTC 2011


    Date: Tuesday, May 24, 2011 @ 21:58:22
  Author: chrisk-guest
Revision: 17136

Added helper script for svn-checking-out upstream source in get-orig-source

Added:
  packages/python-keyczar/trunk/debian/svn-orig-source.sh

Added: packages/python-keyczar/trunk/debian/svn-orig-source.sh
===================================================================
--- packages/python-keyczar/trunk/debian/svn-orig-source.sh	                        (rev 0)
+++ packages/python-keyczar/trunk/debian/svn-orig-source.sh	2011-05-24 21:58:22 UTC (rev 17136)
@@ -0,0 +1,45 @@
+#!/bin/sh
+set -e
+
+# Usage: set the following ENVVARs
+#   UPNAME      upstream source name
+#   UPVER       upstream version
+#   SVNURL      URL to svn repo
+#   SVNREV      svn revision 
+
+workdir=`pwd`
+
+if ! which svn >/dev/null
+then
+        echo "Error: subversion must be installed for this to work" >&2
+        exit 1
+fi
+
+for reqvar in UPNAME UPVER SVNURL SVNREV
+do
+    if [ -z "`eval echo '$'$reqvar`" ]
+    then
+            echo "Error: \$$reqvar is not set" >&2
+            exit 1
+    fi
+done
+
+tmpdir=`mktemp -d`
+cd $tmpdir
+
+if ! svn export -q -r $SVNREV $SVNURL $UPNAME-$UPVER.orig
+then
+    rm -rf $tmpdir
+    exit 1
+fi
+
+if ! GZIP="-9" tar --owner=root --group=root --mode=a+rX \
+    -czf orig.tar.gz $UPNAME-$UPVER.orig
+then
+    rm -rf $tmpdir
+    exit 1
+else
+    mv orig.tar.gz $workdir/${UPNAME}_${UPVER}+svn${SVNREV}.orig.tar.gz
+fi
+
+rm -rf $tmpdir


Property changes on: packages/python-keyczar/trunk/debian/svn-orig-source.sh
___________________________________________________________________
Added: svn:executable
   + *




More information about the Python-modules-commits mailing list