X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=update-archive%2Fupdate-archive.sh;h=f7a62523c3b051284c3486f57380a540c7dc05fe;hb=6e737cb4eed4695b9b5d85df64309e3f49cbb5ef;hp=17d4b2953d2b3822df8a6e8e48c35ef668c0185b;hpb=da18f65a25407d37cc9ae9a564e9a6cb736dda76;p=git-tools-moved-to-github.git diff --git a/update-archive/update-archive.sh b/update-archive/update-archive.sh index 17d4b29..f7a6252 100755 --- a/update-archive/update-archive.sh +++ b/update-archive/update-archive.sh @@ -29,51 +29,64 @@ for vdist in ubuntu/gutsy ubuntu/hardy ubuntu/intrepid ubuntu/jaunty ubuntu/karm # Uncomment to clean the .db (cache) # rm tmp/* - # Prepare pool - d=pool/dists/$dist - 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 + 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 - # Make symlinks from the regular FTP archive - ln -sf /home/ftp/pub/*/$vendor/$dist/*.dsc $d/source - ln -sf /home/ftp/pub/*/$vendor/$dist/*.gz $d/source - 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