apt-repository: Make rebuild script only build versions that are not available yet.
authorMatthijs Kooijman <matthijs@stdin.nl>
Thu, 9 Oct 2008 13:18:41 +0000 (15:18 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Thu, 9 Oct 2008 13:18:41 +0000 (15:18 +0200)
rebuild

diff --git a/rebuild b/rebuild
index 5e2528f6293bb277c821fec488ee087e887b6899..326175aa4c7e472cf0b42415ae6e05f7fc3a65a3 100755 (executable)
--- a/rebuild
+++ b/rebuild
@@ -7,7 +7,15 @@ mkdir -p $PACKAGES
 cd $PACKAGES
 
 for i in ../../$SOURCES/*; do 
-       equivs-build $i
+       VERSION=`cat $i | grep "^Version:" | sed "s/^Version: //"`
+       PACKAGE=`cat $i | grep "^Package:" | sed "s/^Package: //"`
+       
+       if [ ! -f "${PACKAGE}_${VERSION}_all.deb" ]; then
+               echo "Building version $VERSION of $PACKAGE"
+               equivs-build $i
+       else
+               echo "Skipping $PACKAGE, version $VERSION already built"
+       fi
 done
 
 cd ../..