From: Adam Dickmeiss Date: Sat, 7 Feb 2009 23:46:51 +0000 (+0100) Subject: Added facility for Ubuntu APT archives X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;ds=inline;h=620236d0994fc1c8b57a0a5eb53a9c5d94588772;p=git-tools-moved-to-github.git Added facility for Ubuntu APT archives --- diff --git a/update-archive/update-archive.sh b/update-archive/update-archive.sh index a7988ea..fbea410 100755 --- a/update-archive/update-archive.sh +++ b/update-archive/update-archive.sh @@ -10,49 +10,49 @@ if test ! -x /usr/bin/apt-ftparchive; then exit 1 fi -if test -z "$1"; then - debiandir=/home/ftp/pub/debian -else - debiandir=$1 -fi - -if test ! -d "$debiandir"; then - echo "$0: The specified '$debiandir' is not a directory" - exit 1 -fi - - # gpg -a -d -o Release.gpg Release confdir=`pwd` -cd $debiandir - -# Uncomment to clean the .db (cache) -# rm ${debiandir}/tmp/* architectures="i386 amd64" -for dist in lenny etch sarge woody; do +for vdist in ubuntu/gutsy ubuntu/hardy ubuntu/intrepid debian/lenny debian/etch debian/sarge debian/woody; do + dist=`basename $vdist` + vendor=`dirname $vdist` + ftpdir=/home/ftp/pub/$vendor + if test ! -d $ftpdir; then + echo "$ftpdir does not exist" + exit 1 + fi + cd $ftpdir + test -d tmp || mkdir tmp + # Uncomment to clean the .db (cache) + # rm tmp/* + # Make symlinks from the regular FTP archive d=pool/dists/$dist if test ! -d $d; then mkdir -p $d; fi + # Remove invalid symlinks for l in $d/*; do if test -L $l; then - if test -f $l; then - : - else + if test ! -f $l; then rm $l fi fi done - # ln -sf /home/ftp/pub/*/debian/$dist/* $d mkdir -p $d/source - ln -sf /home/ftp/pub/*/debian/$dist/* $d/source + ln -sf /home/ftp/pub/*/$vendor/$dist/* $d/source rm $d/source/*.deb for arch in $architectures; do mkdir -p $d/${arch} - ln -sf /home/ftp/pub/*/debian/$dist/*_${arch}.* $d/${arch} - ln -sf /home/ftp/pub/*/debian/$dist/*_all.* $d/${arch} + for f in /home/ftp/pub/*/$vendor/$dist/*_${arch}.* \ + /home/ftp/pub/*/$vendor/$dist/*_all.*; do + if test -f $f; then + ln -sf $f $d/${arch} + fi + done + #ln -sf /home/ftp/pub/*/$vendor/$dist/*_${arch}.* $d/${arch} + #ln -sf /home/ftp/pub/*/$vendor/$dist/*_all.* $d/${arch} done # ${confdir}/symclean.sh $d