[Pkg-xen-changes] r47 - trunk/scripts

Guido Trotter ultrotter at costa.debian.org
Wed Feb 22 18:32:21 UTC 2006


Author: ultrotter
Date: 2006-02-22 18:32:20 +0000 (Wed, 22 Feb 2006)
New Revision: 47

Modified:
   trunk/scripts/hg2dist.sh
Log:
change hg2dist to detect if the last changeset is the actual release, and in that case don't add the +hg stuff to it


Modified: trunk/scripts/hg2dist.sh
===================================================================
--- trunk/scripts/hg2dist.sh	2006-02-21 09:24:17 UTC (rev 46)
+++ trunk/scripts/hg2dist.sh	2006-02-22 18:32:20 UTC (rev 47)
@@ -15,11 +15,20 @@
 
 
 CHANGESET=$( (cd $HGDIR; $HG log | head -1 ) | sed -e 's/ //g;' | cut -d: -f2)
-RELEASE=$( (cd $HGDIR; $HG log | grep "tag:.*RELEASE" | head -1) | sed -e 's/ //g; s/tag:RELEASE-//')
 
-DESTDIR="xen-${RELEASE}+hg${CHANGESET}"
-DESTTAR="xen_${RELEASE}+hg${CHANGESET}.orig.tar.gz"
+RELEASE_LG=$( (cd $HGDIR; $HG log | grep -B 1 "tag:.*RELEASE" | head -2) | sed -e 's/ //g')
+REL_VER=$( echo $RELEASE_LG | cut -d: -f2 )
+REL_CHG=$( echo $RELEASE_LG | cut -d- -f2 )
 
+if [ $REL_CHG = $CHANGESET ]; then
+	DESTDIR="xen-${REL_VER}"
+	DESTTAR="xen_${REL_VER}.orig.tar.gz"
+else
+	DESTDIR="xen-${REL_VER}+hg${CHANGESET}"
+	DESTTAR="xen_${REL_VER}+hg${CHANGESET}.orig.tar.gz"
+fi
+
+
 if [ -d $DESTDIR ]; then
 	echo "Destination directory $DESTDIR already exists"
 	exit 1




More information about the Pkg-xen-changes mailing list