From 58460b952416511f42e06a6ce543001407eb3542 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sun, 30 Jun 2019 13:03:04 +0200 Subject: [PATCH] bug --- mkmirrortree | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) 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