outils de creation du miroir Lalis
This commit is contained in:
52
mkmirrortree
Normal file → Executable file
52
mkmirrortree
Normal file → Executable file
@@ -1,26 +1,30 @@
|
||||
#!/bin/bash
|
||||
ARCH="SRPMS x86_64 i586 armv7hl aarch64"
|
||||
DEPOT="release update"
|
||||
echo "Créer une arborescence de miroir MAgeia dans le dossier `pwd`?"
|
||||
read YN
|
||||
if [ "$YN" = "y" ] || [ "$YN" = "Y" ] ;then
|
||||
for i in $*; do
|
||||
for j in $ARCH;do
|
||||
if [ "$j" = "SRPMS" ]; then
|
||||
MEDIA="";
|
||||
else
|
||||
MEDIA="/media"
|
||||
fi
|
||||
for k in $DEPOT;do
|
||||
echo "./mageia/distrib/$i/$j$MEDIA/core/$k"
|
||||
mkdir -p "./mageia/distrib/$i/$j$MEDIA/core/$k"
|
||||
if ! [ -z $MEDIA ]; then
|
||||
mkdir -p "./mageia/distrib/$i/$j$MEDIA/media_info"
|
||||
printf "[media_info]
|
||||
version=$i
|
||||
MIRROR="/mnt/lalis/mirror"
|
||||
ARCHLIST="SRPMS x86_64 i586 armv7hl aarch64"
|
||||
DEPOT="release updates"
|
||||
|
||||
cd "$MIRROR"
|
||||
echo `pwd`
|
||||
|
||||
for DIR in `ls -A $MIRROR/mageia/distrib`
|
||||
do
|
||||
for ARCH in $ARCHLIST;do
|
||||
if [ "$ARCH" = "SRPMS" ]; then
|
||||
MEDIA="";
|
||||
else
|
||||
MEDIA="/media"
|
||||
fi
|
||||
for k in $DEPOT; do
|
||||
echo "./mageia/lalis/$DIR/$ARCH$MEDIA/core/$k"
|
||||
mkdir -p "./mageia/lalis/$DIR/$ARCH$MEDIA/core/$k"
|
||||
if ! [ -z "$MEDIA" ]; then
|
||||
echo "generation des medias"
|
||||
mkdir -p "./mageia/lalis/$DIR/$ARCH$MEDIA/media_info"
|
||||
printf "[media_info]
|
||||
version=$DIR
|
||||
mediacfg_version=2
|
||||
branch=Official
|
||||
arch=$j
|
||||
arch=$ARCH
|
||||
xml-info=1
|
||||
|
||||
[core/release]
|
||||
@@ -69,9 +73,9 @@ media_types=official:free:updates:source
|
||||
name=Core Updates Sources
|
||||
noauto=1
|
||||
rpms=core/updates
|
||||
">"./mageia/distrib/$i/$j$MEDIA/media_info/media.cfg"
|
||||
fi
|
||||
done
|
||||
">"./mageia/lalis/$DIR/$ARCH$MEDIA/media_info/media.cfg"
|
||||
fi
|
||||
gendistrib --nobadrpm --blind --skipmissingdir "./mageia/lalis/$DIR/$ARCH$MEDIA/core/$k"
|
||||
done
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
Reference in New Issue
Block a user