diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
commit | 1be510f9529cb082f802408b472a77d074b394c0 (patch) | |
tree | b175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-sysadm/attachments/20110106/6b6e0afe/attachment.obj | |
parent | fa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff) | |
download | archives-master.tar archives-master.tar.gz archives-master.tar.bz2 archives-master.tar.xz archives-master.zip |
Diffstat (limited to 'zarb-ml/mageia-sysadm/attachments/20110106/6b6e0afe/attachment.obj')
-rw-r--r-- | zarb-ml/mageia-sysadm/attachments/20110106/6b6e0afe/attachment.obj | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/attachments/20110106/6b6e0afe/attachment.obj b/zarb-ml/mageia-sysadm/attachments/20110106/6b6e0afe/attachment.obj new file mode 100644 index 000000000..3d56a3356 --- /dev/null +++ b/zarb-ml/mageia-sysadm/attachments/20110106/6b6e0afe/attachment.obj @@ -0,0 +1,96 @@ +#!/bin/bash + +[ -n "$1" ] && cd $1 +echo "Generating repository structure in" `pwd` + +fc() { + [ -z "$1" ] && return + l=$(echo -n $1 | cut -c1 | tr 'a-z' 'A-Z') + r=$(echo $1 | cut -c2-) + echo -n "$l$r " + shift + fc $* +} + +gen_media_cfg() { + arch=$1 + cat <<EOF +[media_info] +version=1.0 +mediacfg_version=2 +branch=Official +arch=$arch +xml-info=1 + +EOF + for media in core nonfree tainted + do + for branch in release testing backports updates backports_testing + do + tags="official" + update_for= + noauto= + name=$(fc $media $(echo $branch | tr '_' ' ')) + + if [ ${media} == "core" ]; then + tags="$tags:free" + else + noauto="nauto=1" + fi + if [ ${branch} == "backports_testing" ]; then + tags="$tags:backports:testing" + else + tags="$tags:$branch" + if [ ${branch} == "updates" ]; then + update_for="update_for=$media/release" + fi + fi + cat <<EOF +[$media/$branch] +hdlist=hdlist_${media}_${branch}.cz +name=$name +srpms=../../SRPMS/$media/$branch +media_type=$tags +EOF + [ -n "$update_for" ] && echo $update_for + [ -n "$noauto" ] && echo $noauto + echo + + cat <<EOF +[debug_$media/$branch] +hdlist=hdlist_debug_${media}_${branch}.cz +name=${name}Debug +srpms=../../SRPMS/debug_$media/$branch +media_type=$tags:debug +noauto=1 +EOF + echo + + cat <<EOF +[../../SRPMS/$media/$branch] +hdlist=hdlist_${media}_${branch}.src.cz +name=${name}Sources +rpms=$media/$branch +noauto=1 +media_type=$tags:source + +EOF + done + done +} + +for arch in i586 x86_64 +do + for media in core nonfree tainted + do + for branch in release testing backports updates backports_testing + do + mkdir -p SRPMS/$media/$branch/media_info + mkdir -p $arch/media/$media/$branch/media_info + mkdir -p $arch/media/debug_$media/$branch/media_info + done + done + mkdir $arch/media/media_info + gen_media_cfg $arch > $arch/media/media_info/media.cfg + gendistrib --skipmissingdir $arch/ +done
\ No newline at end of file |