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

Guido Trotter ultrotter at costa.debian.org
Tue Feb 21 09:24:21 UTC 2006


Author: ultrotter
Date: 2006-02-21 09:24:17 +0000 (Tue, 21 Feb 2006)
New Revision: 46

Modified:
   trunk/scripts/hg2dist.sh
Log:
Add a couple more checks to hg2dist and create orig tar too


Modified: trunk/scripts/hg2dist.sh
===================================================================
--- trunk/scripts/hg2dist.sh	2006-02-21 09:19:39 UTC (rev 45)
+++ trunk/scripts/hg2dist.sh	2006-02-21 09:24:17 UTC (rev 46)
@@ -18,13 +18,28 @@
 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"
 
+if [ -d $DESTDIR ]; then
+	echo "Destination directory $DESTDIR already exists"
+	exit 1
+fi
+
+if [ -f $DESTTAR ]; then
+	echo "Destination file $DESTTAR already exists"
+fi
+
 echo "Exporting xen to $DESTDIR..."
 
-mkdir $DESTDIR
+mkdir $DESTDIR || exit 1;
+
 cp -R $HGDIR/* $DESTDIR/ # This skips everything starting with a ., which is what we want
 (cd $HGDIR; $HG log) > $DESTDIR/ChangeLog
 
+echo "Creating orig file $DESTTAR..."
+
+tar -zc $DESTDIR -f $DESTTAR || exit 1;
+
 echo "DONE"
 echo "Now please svn export your debian directory in $DESTDIR and check that the changelog version matches"
 




More information about the Pkg-xen-changes mailing list