35 lines
845 B
Bash
Executable File
35 lines
845 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
MIRRORPATH="/mnt/lalis/mirror/mageia/lalis"
|
|
ARCH_LIST="i586 x86_64 noarch aarch64 armv7hl"
|
|
|
|
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 $ARCH_LIST
|
|
{
|
|
if [ -d RPMS/$ARCH ];then
|
|
if [ "$ARCH" = "noarch" ]; then
|
|
for MARCH in $ARCHLIST
|
|
{
|
|
if [ -d $MIRRORPATH/$X/$MARCH/media/core/ ]; then
|
|
rsync -aP RPMS/$ARCH/*mga$X* $MIRRORPATH/$X/$MARCH/media/core/
|
|
fi
|
|
}
|
|
else
|
|
rsync -aP RPMS/$ARCH/*mga$X* $MIRRORPATH/$X/$ARCH/media/core/
|
|
if [ $? -ne 0 ]; then
|
|
echo "error rsync : $LINENO"
|
|
exit 1
|
|
fi
|
|
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 .
|