Géeneration automatique des listes de paquets pour bcfg2

darcs-hash:20080319233101-af139-5519d4ba2df29dfc00711f815adce99d93984343.gz
This commit is contained in:
Jeremie Dimino 2008-03-20 00:31:01 +01:00
parent 8c31851006
commit c42796ee67
2 changed files with 42 additions and 21 deletions

16
bcfg2/create-versions-index.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
# Outil pour générer la liste des paquets pour bcfg2
generate () {
# $1 = distribution (etch, lenny, ...)
distrib=$1
arch=$2
arch2=$3
cat $(locate -r "/$distrib/.*/binary-$arch/Packages$") /mirror/custom/Packages | \
awk '$1 == "Package:" {printf "%s ", $2} $1 == "Version:" {print $2}' | \
/usr/scripts/bcfg2/create-versions-index.py $arch2 $distrib > /usr/scripts/var/bcfg2/packages-generated-$distrib-$arch2.xml
}
generate etch i386 i686
generate etch amd64 x86_64