X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=rebuild;h=60d1db070e416be08b38f81dc138d22d53708111;hb=2d0ec7327bfae4a4ca494d1f490fb6a879d728dc;hp=5e2528f6293bb277c821fec488ee087e887b6899;hpb=8312b4526cc2839f418e28cb526cfb85969a3133;p=apt-repository.git diff --git a/rebuild b/rebuild index 5e2528f..60d1db0 100755 --- a/rebuild +++ b/rebuild @@ -1,5 +1,5 @@ #!/bin/sh -SOURCES=sources +SOURCES=sources/equivs PACKAGES=public/packages mkdir -p $PACKAGES @@ -7,6 +7,33 @@ mkdir -p $PACKAGES cd $PACKAGES for i in ../../$SOURCES/*; do + BASE=`basename "$i"` + if [ -d "$i" ]; then + echo "Skipping directory '$BASE'" + continue; + fi + if [ ! -f "$i" ]; then + echo "Skipping special file file '$BASE'" + continue; + fi + if [ ! -r "$i" ]; then + echo "Skipping non-readable file '$BASE'" + continue; + fi + + VERSION=`cat $i | grep "^Version:" | sed "s/^Version: //"` + PACKAGE=`cat $i | grep "^Package:" | sed "s/^Package: //"` + + if [ -z "${PACKAGE}" -o -z "${VERSION}" ]; then + echo "Skipping non-equivs file '$BASE'" + continue; + fi + if [ -f "${PACKAGE}_${VERSION}_all.deb" ]; then + echo "Skipping $PACKAGE, version $VERSION already built" + continue; + fi + + echo "Building version $VERSION of $PACKAGE" equivs-build $i done