dry_run=
verbose=
log=
-skip_core=
+skip_core=true
root=/mirror/
+dhozac_url=rsync://rpm.hozac.com/dhozac/centos/
+
us_fedora_url=rsync://mirrors.kernel.org/fedora
us_centos_url=rsync://mirrors.rit.edu/centos
us_epel_url=rsync://rsync.gtlib.gatech.edu/fedora-epel
-# this one is contaminated with the .~tmp~ thing
-
-eu_fedora_url=rsync://mirrors.ircam.fr/fedora-linux
+# ircam's fedora8 repo has been turned off
+#eu_fedora_url=rsync://mirrors.ircam.fr/fedora-linux
+#eu_fedora_url=rsync://mirror.ovh.net/download.fedora.redhat.com/linux
+eu_fedora_url=rsync://ftp-stud.hs-esslingen.de/fedora/linux
eu_centos_url=rsync://mirrors.ircam.fr/CentOS
eu_epel_url=rsync://mirrors.ircam.fr/fedora-epel
+pl_fedora_url=$eu_fedora_url
+pl_centos_url=rsync://ftp.tpnet.pl/centos
+pl_epel_url=rsync://ftp.icm.edu.pl/pub/Linux/fedora/linux/epel
+
jp_fedora_url="jp_fedora_url-needs-to-be-defined"
jp_centos_url="jp_centos_url-needs-to-be-defined"
jp_epel_url="jp_epel_url-needs-to-be-defined"
-default_distroname=f8
-all_distronames="f8 f9 centos5.2 epel5"
-default_arch=i386
+default_distroname="centos5.4"
+all_distronames="f10 f12 centos5.3 centos5.4 epel5"
+default_arch="i386"
all_archs="i386 x86_64"
case $(hostname) in
*.fr|*.de|*.uk)
fedora_url=$eu_fedora_url ; centos_url=$eu_centos_url ; epel_url=$eu_epel_url ;;
+ *.pl)
+ fedora_url=$pl_fedora_url ; centos_url=$pl_centos_url ; epel_url=$pl_epel_url ;;
*.jp)
fedora_url=$jp_fedora_url ; centos_url=$jp_centos_url ; epel_url=$jp_epel_url ;;
*)
distro="Fedora Core"
rsyncurl=$fedora_url
;;
- f*[7-9])
+ f*[7-9]|f1?)
distroindex=$(echo $distroname | sed -e "s,f,,g")
distro="Fedora"
rsyncurl=$fedora_url
distro=epel
rsyncurl=$epel_url
;;
+ dhozac)
+ distroindex=5
+ distro="dhozac"
+ rsyncurl=$dhozac_url
+ ;;
*)
echo "WARNING -- Unknown distribution $distroname -- skipped"
return 1
paths="$paths core/updates/$distroindex/$arch/ extras/$distroindex/$arch/"
RES=0
;;
- 7|8|9)
+ 7|8|9|1?)
[ -z "$skip_core" ] && paths="releases/$distroindex/Everything/$arch/os/"
paths="$paths updates/$distroindex/$arch/"
# f8 and f9 have the additional newkey repo
localpath=epel
;;
+ dhozac*)
+ case $distroindex in
+ 5)
+ # leave off trailing '/'
+ paths="$paths $distroindex/vserver/$arch"
+ RES=0
+ ;;
+ esac
+ localpath=dhozac
+ ;;
+
esac
if [ "$RES" = 1 ] ; then
echo " -n : dry run"
echo " -v : verbose"
echo " -l : turns on autologging in $LOGDIR"
- echo " -c : skips core repository"
+ echo " -c : skips core repository (default)"
+ echo " -C : force syncing core repository"
echo " -r root (default is $root)"
echo " -u rsyncurl for fedora (default is $fedora_url)"
echo " -U rsyncurl for centos (default is $centos_url)"
function main () {
distronames=""
archs=""
- while getopts "nvlcr:u:U:E:sejf:Fa:Ah" opt ; do
+ while getopts "nvlcCr:u:U:E:sejf:Fa:Ah" opt ; do
case $opt in
n) dry_run=--dry-run ;;
v) verbose=--verbose ;;
l) log=true ;;
c) skip_core=true ;;
+ C) skip_core= ;;
r) root=$OPTARG ;;
u) fedora_url=$OPTARG ;;
U) centos_url=$OPTARG ;;
h|*) usage ;;
esac
done
+ shift $(($OPTIND-1))
+ [[ -n "$@" ]] && usage
[ -z "$distronames" ] && distronames=$default_distroname
[ -z "$archs" ] && archs=$default_arch