From 480027bf78ce519d33b126fd9fea08db9b600977 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sun, 12 Apr 2020 11:14:24 +0200 Subject: [PATCH] renommage Signed-off-by: Daniel Tartavel --- cp2mirror.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 cp2mirror.sh diff --git a/cp2mirror.sh b/cp2mirror.sh new file mode 100644 index 0000000..a478b60 --- /dev/null +++ b/cp2mirror.sh @@ -0,0 +1,22 @@ +#!/usr/bin/bash + +MIRRORPATH="/mnt/lalis/mirror/mageia/lalis" + +for X in 7 8 +{ + rsync -aP SRPMS/*mga$X* $MIRRORPATH/$X/SRPMS/core/ + if [ $? -ne 0 ]; then + echo "error rsync : $LINENO" + exit 1 + 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 + } +} +chmod a+rX -R .