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