From: Marc Fiuczynski Date: Mon, 19 Nov 2007 17:55:16 +0000 (+0000) Subject: add --delete to rsync command to ensure that old rpms that are no longer in the repo... X-Git-Tag: 4.2-rc2~516 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d48d2fdbb8f2995e75a291a42946e141123e574e;p=build.git add --delete to rsync command to ensure that old rpms that are no longer in the repo get deleted locally --- diff --git a/vbuild-fedora-mirror.sh b/vbuild-fedora-mirror.sh index 773a1932..3490ccaf 100755 --- a/vbuild-fedora-mirror.sh +++ b/vbuild-fedora-mirror.sh @@ -48,30 +48,30 @@ case $findex in 2|4|6) echo "============================== $findex core" mkdir -p ${root}/core/$findex/$arch/os/ - rsync $dry_run -avz --exclude debug/ ${rsyncurl}/core/$findex/$arch/os/ ${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 --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${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 --exclude debug/ ${rsyncurl}/extras/$findex/$arch/ ${root}/extras/$findex/$arch/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/extras/$findex/$arch/ ${root}/extras/$findex/$arch/ ;; 7) echo "============================== $findex core" mkdir -p ${root}/core/$findex/$arch/os/ - rsync $dry_run -avz --exclude debug/ ${rsyncurl}/core/$findex/Everything/$arch/os/ ${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 --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ ;; 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 --exclude debug/ ${rsyncurl}/core/$findex/$arch/os/ ${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 --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ + rsync $dry_run -avz --delete --exclude debug/ ${rsyncurl}/core/updates/$findex/$arch/ ${root}/core/updates/$findex/$arch/ ;; *) echo "Unknown fedora index $findex - exiting"