84 lines
1.9 KiB
Bash
Executable File
84 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
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
|
|
if [ -d "$MIRROR/$DIR" ]; then
|
|
for ARCH in $ARCHLIST;do
|
|
if [ "$ARCH" = "SRPMS" ]; then
|
|
MEDIA="";
|
|
else
|
|
MEDIA="/media"
|
|
fi
|
|
for k in $DEPOT; do
|
|
echo "./lalis/$DIR/$ARCH$MEDIA/core/$k"
|
|
mkdir -p "./lalis/$DIR/$ARCH$MEDIA/core/$k"
|
|
if ! [ -z "$MEDIA" ]; then
|
|
echo "generation des medias"
|
|
mkdir -p "./lalis/$DIR/$ARCH$MEDIA/media_info"
|
|
printf "[media_info]
|
|
version=$DIR
|
|
mediacfg_version=2
|
|
branch=Official
|
|
arch=$ARCH
|
|
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/lalis/$DIR/$ARCH$MEDIA/media_info/media.cfg"
|
|
fi
|
|
#gendistrib --nobadrpm --blind --skipmissingdir "./mageia/lalis/$DIR/$ARCH$MEDIA/core/$k"
|
|
done
|
|
done
|
|
fi
|
|
done
|