1
0

first commit of mkmirrortree

This commit is contained in:
Daniel Tartavel 2019-06-22 23:37:53 +02:00
parent c413ec0bda
commit 2ad5c44774

77
mkmirrortree Normal file
View File

@ -0,0 +1,77 @@
#!/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
mediacfg_version=2
branch=Official
arch=$j
xml-info=1
[core/release]
hdlist=hdlist_core_release.cz
media_type=official:free:release
media_types=official:free:release
name=Core Release
srpms=../../SRPMS/core/release
[debug/core/release]
hdlist=hdlist_debug_core_release.cz
media_type=official:free:release:debug
media_types=official:free:release:debug
name=Core Release Debug
noauto=1
srpms=../../SRPMS/core/release
[../../SRPMS/core/release]
hdlist=hdlist_core_release.src.cz
media_type=official:free:release:source
media_types=official:free:release:source
name=Core Release Sources
noauto=1
rpms=core/release
[core/updates]
hdlist=hdlist_core_updates.cz
media_type=official:free:updates
media_types=official:free:updates
name=Core Updates
srpms=../../SRPMS/core/updates
updates_for=core/release
[debug/core/updates]
hdlist=hdlist_debug_core_updates.cz
media_type=official:free:updates:debug
media_types=official:free:updates:debug
name=Core Updates Debug
noauto=1
srpms=../../SRPMS/core/updates
[../../SRPMS/core/updates]
hdlist=hdlist_core_updates.src.cz
media_type=official:free:updates:source
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
done
done
fi