From: Greg Price <price@mit.edu>
Date: Sun, 27 Apr 2008 03:47:34 +0000 (-0400)
Subject: use reprepro more correctly
X-Git-Tag: sipb-xen-dev/17~1
X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/commitdiff_plain/d9930dd712a1e004c3ee1db96478df44f0ccf531

use reprepro more correctly

svn path=/trunk/packages/sipb-xen-dev/; revision=470
---

diff --git a/sx-build-release b/sx-build-release
index a23b03e..7705662 100755
--- a/sx-build-release
+++ b/sx-build-release
@@ -29,8 +29,12 @@ else
 fi
 
 cd ..
-reprepro-env include unstable `pwd`/${Source}_*${Version}*.changes
-reprepro-env include stable   `pwd`/${Source}_*${Version}*.changes
+[ $Distribution = 'unstable' ] \
+ || echo "$(basename $0): warning: Distribution is ${Distribution}, script expects unstable"
+changesfile=`pwd`/${Source}_*${Version}*.changes
+reprepro-env include unstable $changesfile
+reprepro-env copy stable unstable ${Source} \
+  $(perl '-F:\s+' -lane 'print $F[1]." " if /^Binary/' <$changesfile)
 
 cd ..
 rm -rf build-release