X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=update-archive%2Fupdate-archive.sh;h=f7a62523c3b051284c3486f57380a540c7dc05fe;hb=6e737cb4eed4695b9b5d85df64309e3f49cbb5ef;hp=fbea4103837d3a534a0c344a3451cf9461f8799f;hpb=620236d0994fc1c8b57a0a5eb53a9c5d94588772;p=git-tools-moved-to-github.git diff --git a/update-archive/update-archive.sh b/update-archive/update-archive.sh index fbea410..f7a6252 100755 --- a/update-archive/update-archive.sh +++ b/update-archive/update-archive.sh @@ -16,7 +16,7 @@ confdir=`pwd` architectures="i386 amd64" -for vdist in ubuntu/gutsy ubuntu/hardy ubuntu/intrepid debian/lenny debian/etch debian/sarge debian/woody; do +for vdist in ubuntu/gutsy ubuntu/hardy ubuntu/intrepid ubuntu/jaunty ubuntu/karmic debian/squeeze debian/lenny debian/etch; do dist=`basename $vdist` vendor=`dirname $vdist` ftpdir=/home/ftp/pub/$vendor @@ -29,50 +29,64 @@ for vdist in ubuntu/gutsy ubuntu/hardy ubuntu/intrepid debian/lenny debian/etch # 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 - rm $l + for section in main non-free; do + # Prepare pool + d=pool/dists/$dist/$section + if test ! -d $d; then mkdir -p $d; fi + mkdir -p $d/source + # Remove invalid symlinks (source, i386, amd64,..) + for l in $d/*/*; do + if test -L "$l"; then + if test ! -f "$l"; then + rm $l + fi fi - fi - done - mkdir -p $d/source - ln -sf /home/ftp/pub/*/$vendor/$dist/* $d/source - rm $d/source/*.deb - for arch in $architectures; do - mkdir -p $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} + done + # Make symlinks from the regular FTP archive + for pdir in /home/ftp/pub/*; do + use=false + if test -f $pdir/.htaccess -a $section = "non-free"; then + use=true + fi + if test ! -f $pdir/.htaccess -a $section = "main"; then + use=true + fi + 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 arch in $architectures; do + mkdir -p $d/${arch} + for f in $pdir/.htaccess \ + $distdir/*_${arch}.* \ + $distdir/*_all.*; do + if test -f $f; then + ln -sf $f $d/${arch} + fi + done + done + fi 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 - - for arch in $architectures; do - d=dists/$dist/main/binary-$arch - if test ! -d $d; then mkdir -p $d; fi - echo "Archive: $dist" >$d/Release - echo 'Component: main' >>$d/Release - echo 'Origin: Indexdata' >>$d/Release + # ${confdir}/symclean.sh $d + + for arch in $architectures; do + d=dists/$dist/$section/binary-$arch + if test ! -d $d; then mkdir -p $d; fi + echo "Archive: $dist" >$d/Release + echo "Component: $section" >>$d/Release + echo 'Origin: Indexdata' >>$d/Release echo "Architecture: $arch" >>$d/Release + done + + d=dists/$dist/$section/source + if test ! -d $d; then mkdir -p $d; fi + echo "Archive: $dist" >$d/Release + echo "Component: $section" >>$d/Release + echo 'Origin: Indexdata' >>$d/Release + echo 'Architecture: source' >>$d/Release done - - d=dists/$dist/main/source - if test ! -d $d; then mkdir -p $d; fi - echo "Archive: $dist" >$d/Release - echo 'Component: main' >>$d/Release - echo 'Origin: Indexdata' >>$d/Release - echo 'Architecture: source' >>$d/Release - # generate echo "Begin Generate $dist" F=apt-ftparchive.conf