[Pkg-gnutls-commits] r66 - in /scripts: ./ svn-edit-patch

jamesw-guest at users.alioth.debian.org jamesw-guest at users.alioth.debian.org
Fri Jun 9 09:20:22 UTC 2006


Author: jamesw-guest
Date: Fri Jun  9 09:20:17 2006
New Revision: 66

URL: http://svn.debian.org/wsvn/pkg-gnutls/?sc=1&rev=66
Log:
Initial import

Added:
    scripts/
    scripts/svn-edit-patch   (with props)

Added: scripts/svn-edit-patch
URL: http://svn.debian.org/wsvn/pkg-gnutls/scripts/svn-edit-patch?rev=66&op=file
==============================================================================
--- scripts/svn-edit-patch (added)
+++ scripts/svn-edit-patch Fri Jun  9 09:20:17 2006
@@ -1,0 +1,54 @@
+#!/bin/bash
+
+function usage {
+
+echo " Usage: $0 patchname
+    where patchname is the name of the patch to edit. It will be
+    created (with a .patch suffix) if it does not exist.
+
+ Allows you to use cdbs-edit-patch with a source that use the
+ mergeWithUpstream features of svn-buildpackage.
+ Run it from the directory containing your working copy of the debian/
+ directory, and give it the name of the patch as the argument.
+ You will then get a normal cdbs-edit-patch shell. When you exit the
+ patch will be created in your working copy of the debian/ dir.
+ (Remember to use svn add on the patch afterwards before you build)
+
+ There are currently problems if cdbs-edit-patch fails in some way,
+ or you create an empty patch or cancel the editing of the patch.
+ In these cases you may have to delete the empty patch file from
+ debian/patches before you continue."
+
+}
+
+if test -z $1 || test "$1" == "-h" || test "$1" == "--help"; then
+  usage
+  exit
+fi
+
+ORIGDIR=`pwd`
+
+DIR=`mktemp -d /tmp/svn-edit-patch.XXXXX`
+trap "rm -rf $DIR" 0 1 2 3 9 11 13 15
+
+SOURCE=`dpkg-parsechangelog | grep "Source:" | sed -e 's/Source: //'`
+VERSION=`dpkg-parsechangelog | grep "Version:" | sed -e 's/Version: //' | perl -n -e '$_ =~ s/-(.*?)$//;print $_'`
+
+SVNEXPORT="svn-buildpackage --svn-export --svn-ignore --svn-override=buildArea=$DIR"
+
+CREATEDIFF="cdbs-edit-patch"
+
+$SVNEXPORT
+
+cd $DIR/${SOURCE}-${VERSION}
+
+mkdir -p debian/patches
+touch debian/patches/${1}.patch
+
+$CREATEDIFF $1
+
+mkdir -p ${ORIGDIR}/debian/patches
+cp -f debian/patches/${1}.patch ${ORIGDIR}/debian/patches/
+
+/bin/rm -rf $DIR
+

Propchange: scripts/svn-edit-patch
------------------------------------------------------------------------------
    svn:executable = 




More information about the Pkg-gnutls-commits mailing list