-case $findex in
- 2|4|6)
- echo "============================== $findex core"
- mkdir -p ${root}/core/$findex/$arch/os/
- rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/$findex/$arch/os/ ${root}/core/$findex/$arch/os/
- echo "============================== $findex updates"
- mkdir -p ${root}/core/updates/$findex/$arch/
- rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/
- echo "============================== $findex extras"
- mkdir -p ${root}/extras/$findex/$arch/
- rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/extras/$findex/$arch/ ${root}/extras/$findex/$arch/
- RES=0
- ;;
- 7)
- echo "============================== $findex core"
- mkdir -p ${root}/core/$findex/$arch/os/
- rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/$findex/Everything/$arch/os/ ${root}/core/$findex/$arch/os/
- echo "============================== $findex updates"
- mkdir -p ${root}/core/updates/$findex/$arch/
- rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/
- RES=0
- ;;
- 8)
- # somehow the layout on my favorite mirror is different in 7 and 8, /Everything/ has gone
- echo "============================== $findex core"
- mkdir -p ${root}/core/$findex/$arch/os/
- rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/$findex/$arch/os/ ${root}/core/$findex/$arch/os/
- echo "============================== $findex updates"
- mkdir -p ${root}/core/updates/$findex/$arch/
- rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/
- RES=0
+case $distro in
+ [Ff]edora*)
+ case $distroindex in
+ 2|4|6)
+ for repopath in core/$distroindex/$arch/os/ core/updates/$distroindex/$arch/ extras/$distroindex/$arch/
+ do
+ echo "============================== $distro -> $distroindex $repopath"
+ mkdir -p ${root}/${path}
+ rsync $options ${rsyncurl}/${repopath} ${root}/${repopath}
+ done
+ RES=0
+ ;;
+
+ 7|8)
+ for repopath in releases/$distroindex/Everything/$arch/os/ updates/$distroindex/$arch/
+ do
+ echo "============================== $distro -> $distroindex $repopath"
+ mkdir -p ${root}/${repopath}
+ rsync $options ${rsyncurl}/${repopath} ${root}/${repopath}
+ done
+ RES=0
+ ;;
+ *)
+ echo "Unknown fedora index $distroindex - exiting"
+ RES=1
+ ;;
+ esac