2 #if test ! -x /usr/bin/createrepo; then
3 # echo "$0: /usr/bin/createrepo missing. Install createrepo"
8 architectures="i386 x86_64"
9 for vdist in centos/5.5 rhel/5.5; do
10 dist=`basename $vdist`
11 vendor=`dirname $vdist`
12 ftpdir=/home/ftp/pub/yum/$vendor/$dist
13 if test ! -d $ftpdir; then
14 echo "$ftpdir does not exist"
19 for section in main restricted; do
22 if test ! -d $d; then mkdir -p $d; fi
23 if test ! -d $d/SRPMS; then mkdir -p $d/SRPMS; fi
24 # Remove invalid symlinks (SRPMS, i386, x86_64,..)
25 for l in $d/SRPMS/*; do
27 if test ! -f "$l"; then
32 for arch in $architectures; do
33 for l in $d/$arch/Packages/*; do
35 if test ! -f "$l"; then
41 # Make symlinks from the regular FTP archive
43 for pdir in /home/ftp/pub/*; do
45 if test -f $pdir/.htaccess -a $section != "main"; then
48 if test ! -f $pdir/.htaccess -a $section = "main"; then
52 distdir=$pdir/redhat/$vendor/$dist
53 if test -d $distdir; then
54 if test -d $distdir/SRPMS; then
55 for f in $distdir/SRPMS/*.src.rpm; do
62 for arch in $architectures; do
63 mkdir -p $d/${arch}/Packages
64 for f in $distdir/RPMS/${arch}/*.rpm $distdir/RPMS/noarch/*.rpm; do
66 ln -sf $f $d/${arch}/Packages/