From 8b553bfe4e3b1174f0bbc378b6b58aefa5f33b24 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sun, 12 Apr 2020 11:38:35 +0200 Subject: [PATCH] ajout debuggage --- cp2mirror.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/cp2mirror.sh b/cp2mirror.sh index a478b60..59658bd 100644 --- a/cp2mirror.sh +++ b/cp2mirror.sh @@ -11,12 +11,23 @@ for X in 7 8 fi for ARCH in x86_64 i586 #aarch64 armv7hl { - rsync -aP RPMS/noarch/*mga$X* $MIRRORPATH/$X/$ARCH/media/core/ - if [ $? -ne 0 ]; then - echo "error rsync : $LINENO" - exit 1 - fi - nice -n 19 gendistrib --nobadrpm --blind --skipmissingdir --mediacfg $MIRRORPATH/$X/$ARCH/media/media_info/media.cfg $MIRRORPATH/$X/$ARCH + if [ -d RPMS/$ARCH ]; then + echo "rsync -aP RPMS/$ARCH/*mga$X* $MIRRORPATH/$X/$ARCH/media/core/" + rsync -aP RPMS/$ARCH/*mga$X* $MIRRORPATH/$X/$ARCH/media/core/ + if [ $? -ne 0 ]; then + echo "error rsync : $LINENO" + exit 1 + fi + fi + if [ -d RPMS/noarch ]; then + echo "rsync -aP RPMS/noarch/*mga$X* $MIRRORPATH/$X/$ARCH/media/core/" + rsync -aP RPMS/noarch/*mga$X* $MIRRORPATH/$X/$ARCH/media/core/ + if [ $? -ne 0 ]; then + echo "error rsync : $LINENO" + exit 1 + fi + fi + nice -n 19 gendistrib --nobadrpm --blind --skipmissingdir --mediacfg $MIRRORPATH/$X/$ARCH/media/media_info/media.cfg $MIRRORPATH/$X/$ARCH } } chmod a+rX -R .