X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=update-archive%2Fupdate-yum-archve.sh;h=9d49d260c4c62f65ddbf515bc027fbf0fbef4ab4;hb=61ccccd556208dab55c8031de69887d8c00ac31c;hp=54b208ab8afa7720b16e9cfd7e17493d1c394b4f;hpb=5e61b2631d85a61b19a011809f4329b5154aa4b2;p=git-tools-moved-to-github.git diff --git a/update-archive/update-yum-archve.sh b/update-archive/update-yum-archve.sh index 54b208a..9d49d26 100755 --- a/update-archive/update-yum-archve.sh +++ b/update-archive/update-yum-archve.sh @@ -48,6 +48,7 @@ for vdist in centos/5.5 rhel/5.5; do fi done for arch in $architectures; do + dirs_to_upd="${dirs_to_upd} ${ftpdir}/${d}/${arch}" for l in $d/$arch/Packages/*; do if test -L "$l"; then if test ! -f "$l"; then @@ -85,7 +86,6 @@ for vdist in centos/5.5 rhel/5.5; do has_packages=true fi done - dirs_to_upd="${dirs_to_upd} ${ftpdir}/${d}/${arch}" done fi fi @@ -97,17 +97,20 @@ rpm --addsign ${pkgs_to_sign} chgrp staff ${pkgs_to_sign} chmod g+w ${pkgs_to_sign} echo "Updating repository meta:" -echo ${dirs_to_upd} for rdir in ${dirs_to_upd}; do - createrepo --update ${rdir} - if test -f ${rdir}/repodata/repomd.xml.asc; then - rm ${rdir}/repodata/repomd.xml.asc + echo "Section ${rdir}" + if test -d $rdir && ls -A $rdir; then + createrepo --update ${rdir} + if test -f ${rdir}/repodata/repomd.xml.asc; then + rm ${rdir}/repodata/repomd.xml.asc + fi + gpg --detach-sign -u "Index Data" --armor ${rdir}/repodata/repomd.xml + else + echo "Empty." fi - gpg --detach-sign -u "Index Data" --armor ${rdir}/repodata/repomd.xml done # Local Variables: # mode:shell-script # sh-indentation: 2 # sh-basic-offset: 8 # End: -