grosse modifs
This commit is contained in:
parent
8f30015131
commit
dfaa6e940a
20
cp2mirror
20
cp2mirror
@ -1,8 +1,7 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
VERSION=$3
|
|
||||||
APP_PATH=$1
|
APP_PATH=$1
|
||||||
MIRRORPATH=$2
|
MIRRORPATH="/mnt/lalis/mirror"
|
||||||
ARCH="x86_64 i586 armv7hl aarch64"
|
ARCH="x86_64 i586 armv7hl aarch64"
|
||||||
|
|
||||||
if [ -e "/usr/local/etc/cp2mirror.conf" ]; then
|
if [ -e "/usr/local/etc/cp2mirror.conf" ]; then
|
||||||
@ -10,18 +9,22 @@ if [ -e "/usr/local/etc/cp2mirror.conf" ]; then
|
|||||||
. /usr/local/etc/cp2mirror.conf
|
. /usr/local/etc/cp2mirror.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $VERSION ] || [ -z $APP_PATH ] || [ -z $MIRRORPATH ]; then
|
if [ -z $APP_PATH ] || ! [ -d $APP_PATH ]; then
|
||||||
echo "arguments invalides"
|
echo "argument invalide"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rsync -aP $APP_PATH/SRPMS/*.mga"$VERSION".* $MIRRORPATH/lalis/$VERSION/SRPMS/core/updates/
|
for VERSION in `ls -A $MIRRORPATH/mageia/distrib`
|
||||||
|
do
|
||||||
|
echo "$MIRRORPATH/mageia/distrib/$VERSION"
|
||||||
|
|
||||||
if [ -e "$APP_PATH/RPMS/noarch" ]; then
|
rsync -aP $APP_PATH/SRPMS/*.mga"$VERSION".* $MIRRORPATH/lalis/$VERSION/SRPMS/core/updates/
|
||||||
|
|
||||||
|
if [ -e "$APP_PATH/RPMS/noarch" ]; then
|
||||||
NOARCH=1
|
NOARCH=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in $ARCH; do
|
for i in $ARCH; do
|
||||||
if [ $NOARCH ]; then
|
if [ $NOARCH ]; then
|
||||||
echo "noarch"
|
echo "noarch"
|
||||||
ARCH_O="noarch"
|
ARCH_O="noarch"
|
||||||
@ -37,5 +40,6 @@ for i in $ARCH; do
|
|||||||
rsync -aP $APP_PATH/RPMS/$ARCH_O/*.mga"$VERSION".* $MIRRORPATH/lalis/$VERSION/$i/media/core/updates/
|
rsync -aP $APP_PATH/RPMS/$ARCH_O/*.mga"$VERSION".* $MIRRORPATH/lalis/$VERSION/$i/media/core/updates/
|
||||||
gendistrib --nobadrpm --blind --skipmissingdir $MIRRORPATH/lalis/$VERSION/$i
|
gendistrib --nobadrpm --blind --skipmissingdir $MIRRORPATH/lalis/$VERSION/$i
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user