[med-svn] r5925 - trunk/packages/figtree/trunk/debian

Andreas Tille tille at alioth.debian.org
Mon Feb 7 21:39:47 UTC 2011


Author: tille
Date: 2011-02-07 21:39:47 +0000 (Mon, 07 Feb 2011)
New Revision: 5925

Modified:
   trunk/packages/figtree/trunk/debian/get-orig-source
Log:
Fix get-orig-source script


Modified: trunk/packages/figtree/trunk/debian/get-orig-source
===================================================================
--- trunk/packages/figtree/trunk/debian/get-orig-source	2011-02-07 21:27:52 UTC (rev 5924)
+++ trunk/packages/figtree/trunk/debian/get-orig-source	2011-02-07 21:39:47 UTC (rev 5925)
@@ -4,15 +4,16 @@
 # only in SVN
 
 PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
-VERSION=`echo $@ | sed 's?^.*--upstream-version \([0-9.]\+\) .*download.html.*?\1?'`
 
-if [ "$VERSION" = "" ] ; then
-    VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $$2 }'`
+if ! echo $@ | grep -q upstream-version ; then
+    VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }'`
+else
+    VERSION=`echo $@ | sed 's?^.*--upstream-version \([0-9.]\+\) .*download.html.*?\1?'`
+    if echo "$VERSION" | grep -q "upstream-version" ; then
+	echo "Unable to parse version number"
+        exit
+    fi
 fi
-if echo "$VERSION" | grep -q "upstream-version" ; then
-    echo "Unable to parse version number"
-    exit
-fi
 
 cd ..
 rm -f  download.html




More information about the debian-med-commit mailing list