[WBEL-users] alternative mirrors for my purpose?

Matt Dainty matt@xrefer.com
Tue, 23 Nov 2004 12:19:34 +0000


On Tue, 2004-11-23 at 11:47, Michiel van Es wrote:
> Kirby C. Bohling wrote:
> > On Mon, Nov 22, 2004 at 06:15:15PM -0500, Christian Reeves wrote:
> > 
> <snip>
> 
> > 
> > 
> > 
> > #!/bin/sh
> > 
> > # re-rsync'ing the entire os and iso dirs is probably overkill given
> > # that they never change.  However, it should be relatively light
> > # over rsync, and I want a script that always works from scratch.
> > 
> > RSYNC_BASE="rsync://mirror.physics.ncsu.edu/whitebox/"
> > versionList="3.0"
> > 
> > for ver in $versionList
> > do
> >         for subdir in os iso
> >         do
> >                 for arch in i386
> >                 do
> >                         echo "Fetching WhiteBox: /mirrors/whitebox/$ver/en/$subdir/"
> >                         mkdir -p /mirrors/whitebox/$ver/en/$subdir/$arch
> >                         rsync -avr -P $RSYNC_BASE/$ver/en/$subdir/$arch/.  /mirrors/whitebox/$ver/en/$subdir/$arch/.
> >                 done
> >         done
> >         rsync -avr -P $RSYNC_BASE/$ver/en/updates/.  /mirrors/whitebox/$ver/en/updates/.
> > done
> > 
> > # God only knows what brain damage the mirrors have done to i386 and
> > # updates directory, I used to never do this, but after getting
> > # tired of waiting days for the mirrors and whiteboxlinux.org to
> > # re-sync, I do this myself if only so my repository will always
> > # have a consistant set of yum header files.
> > 
> > /usr/bin/yum-arch -s -v /mirrors/whitebox/3.0/en/os/i386
> > /usr/bin/yum-arch -s -v /mirrors/whitebox/3.0/en/updates
> > # End of shell script.
> > 
> 
> 
> Kirby, this script is also pulling the SRPMs and ISO files.
> How can I exclude these within your rsync script?

man rsync?

In fact, you can reduce the script to one invocation of rsync with
careful use of its --include and --exclude options. I'm not going to
start a shell scripting pissing contest mind... :-)

Matt