Pbuilder may read IDMETA to get list distros
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 24 Mar 2010 14:48:53 +0000 (15:48 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 24 Mar 2010 14:49:32 +0000 (15:49 +0100)
And first argument is no longer *.dsc. upload is first argument.

id-deb-build/id-pbuild-all.sh

index 3af753a..b93a9f1 100755 (executable)
@@ -1,14 +1,16 @@
 #!/bin/sh
 update=true
-PKG="$1"
-if test -z "$PKG"; then
-       if test -d deb-src; then
-               cd deb-src      
-               for d in *.dsc; do
-                       PKG=$d
-               done
-       fi
+if test -f IDMETA; then
+       . ./IDMETA
+fi
+if test -d deb-src; then
+       cd deb-src
 fi
+for f in *.dsc; do
+       if test -f "$f"; then
+               PKG=$f
+       fi
+done
 if test -z "$PKG"; then
        echo "Specify .dsc file"
        exit 1
@@ -25,7 +27,7 @@ if test -z "$UBUNTU_DIST"; then
        UBUNTU_DIST="karmic jaunty intrepid hardy"
 fi
 
-if test "$2" = "upload"; then
+if test "$1" = "upload"; then
        for dist in ${UBUNTU_DIST}; do
                scp ${dist}-*/* ftp.indexdata.dk:/home/ftp/pub/${PRODUCT}/ubuntu/${dist}
        done