X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=update-archive%2Fupdate-archive.sh;h=5705cddc1859d85dbd18882db0dbab85b6f0be37;hb=458ae70bd6296a8e385c4c2cd9b79e8aef1e9d43;hp=6e678e6bcd6dfb4bd5c512dcf6391d8a4bd534bd;hpb=b28f8a1b012580d47066cdb304c3ac708d947c8e;p=git-tools-moved-to-github.git diff --git a/update-archive/update-archive.sh b/update-archive/update-archive.sh index 6e678e6..5705cdd 100755 --- a/update-archive/update-archive.sh +++ b/update-archive/update-archive.sh @@ -1,7 +1,13 @@ #!/bin/sh -# $Id: update-archive.sh,v 1.13 2008-10-20 10:24:15 adam Exp $ -if test ! -f apt-ftparchive.conf.in; then - echo "$0: apt-ftparchive.conf.in must be located in current directory" +D0=`dirname $0` +confdir=`cd $D0; pwd` + +if test ! -f ${confdir}/apt-ftparchive.conf.in; then + echo "$0: ${condir}/apt-ftparchive.conf.in not found" + exit 1 +fi +if test ! -f ${confdir}/apt-release.conf.in; then + echo "$0: ${condir}/apt-release.conf.in not found" exit 1 fi @@ -12,11 +18,16 @@ fi # gpg -a -d -o Release.gpg Release -confdir=`pwd` architectures="i386 amd64" -for vdist in ubuntu/gutsy ubuntu/hardy ubuntu/intrepid ubuntu/jaunty ubuntu/karmic debian/squeeze debian/lenny debian/etch; do +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 @@ -56,8 +67,9 @@ for vdist in ubuntu/gutsy ubuntu/hardy ubuntu/intrepid ubuntu/jaunty ubuntu/karm if $use; then distdir=$pdir/$vendor/$dist if test -d $distdir; then - ln -sf $distdir/*.dsc $d/source - ln -sf $distdir/*.gz $d/source + for f in $distdir/*.dsc $distdir/*.gz; do + test -f $f && ln -sf $f $d/source + done for arch in $architectures; do mkdir -p $d/${arch} for f in $pdir/.htaccess \