diff --git a/mkmirrortree b/mkmirrortree index ea877fb..901a234 100755 --- a/mkmirrortree +++ b/mkmirrortree @@ -7,20 +7,21 @@ cd "$MIRROR" echo `pwd` for DIR in `ls -A $MIRROR/mageia/distrib` -do - for ARCH in $ARCHLIST;do - if [ "$ARCH" = "SRPMS" ]; then - MEDIA=""; - else - MEDIA="/media" - fi - for k in $DEPOT; do - echo "./mageia/lalis/$DIR/$ARCH$MEDIA/core/$k" - mkdir -p "./mageia/lalis/$DIR/$ARCH$MEDIA/core/$k" - if ! [ -z "$MEDIA" ]; then - echo "generation des medias" - mkdir -p "./mageia/lalis/$DIR/$ARCH$MEDIA/media_info" - printf "[media_info] +do + if [ -d "$DIR" ]; then + for ARCH in $ARCHLIST;do + if [ "$ARCH" = "SRPMS" ]; then + MEDIA=""; + else + MEDIA="/media" + fi + for k in $DEPOT; do + echo "./lalis/$DIR/$ARCH$MEDIA/core/$k" + mkdir -p "./lalis/$DIR/$ARCH$MEDIA/core/$k" + if ! [ -z "$MEDIA" ]; then + echo "generation des medias" + mkdir -p "./lalis/$DIR/$ARCH$MEDIA/media_info" + printf "[media_info] version=$DIR mediacfg_version=2 branch=Official @@ -74,8 +75,9 @@ name=Core Updates Sources noauto=1 rpms=core/updates ">"./mageia/lalis/$DIR/$ARCH$MEDIA/media_info/media.cfg" - fi - gendistrib --nobadrpm --blind --skipmissingdir "./mageia/lalis/$DIR/$ARCH$MEDIA/core/$k" + fi + gendistrib --nobadrpm --blind --skipmissingdir "./mageia/lalis/$DIR/$ARCH$MEDIA/core/$k" + done done - done + fi done