Merge branch 'master' of ssh://kebab.indexdata.dk:222/home/git/pub/git-tools
authorWolfram Schneider <wosch@indexdata.dk>
Mon, 18 Feb 2013 14:57:52 +0000 (14:57 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Mon, 18 Feb 2013 14:57:52 +0000 (14:57 +0000)
update-archive/update-archive.sh
update-archive/update-yum-archive.sh

index e982046..b642138 100755 (executable)
@@ -15,9 +15,14 @@ confdir=`pwd`
 
 architectures="i386 amd64"
 
-for vdist in ubuntu/lucid \
-       ubuntu/natty ubuntu/oneiric ubuntu/precise ubuntu/quantal \
-       debian/wheezy debian/squeeze; do
+architectures="i386 amd64"
+if [ "$1" == "" ]; then 
+       DISTRIBUTIONS="ubuntu/lucid ubuntu/natty ubuntu/oneiric ubuntu/precise ubuntu/quantal debian/wheezy debian/squeeze debian/lenny"
+else
+       DISTRIBUTIONS=$1
+fi
+
+for vdist in $DISTRIBUTIONS ; do
        dist=`basename $vdist`
        vendor=`dirname $vdist`
        ftpdir=/home/ftp/pub/$vendor
index 1e3f633..f280e64 100755 (executable)
@@ -86,9 +86,17 @@ for vdist in centos/5.5 rhel/5.5 centos/6; do
           for arch in $architectures; do
             mkdir -p $d/${arch}/Packages
             for f in $distdir/RPMS/${arch}/*.rpm $distdir/RPMS/noarch/*.rpm; do
+              b=`basename $f`
               if test -f $f; then
+                mustsign=false
                age=`stat --printf='%Y' $f`
                if expr $now - $age \< $signage >/dev/null; then
+                  mustsign=true
+                fi
+                if test ! -f $d/${arch}/Packages/$b; then
+                 mustsign=true
+                fi
+                if $mustsign; then
                   ln -sf $f $d/${arch}/Packages/
                  if rpm -K $f|grep -q ' gpg' >/dev/null; then
                    echo "Already signed $f"