From 95a712bf8ad6be77ada54461b248e9a873525cf5 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 9 Oct 2005 16:49:52 +0000 Subject: [PATCH] Clifford Wolf: Added -cksumpatch option to ./scripts/Download [2005092216204806409] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@6433 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Download | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/Download b/scripts/Download index 13b0adf5f..b0a831701 100755 --- a/scripts/Download +++ b/scripts/Download @@ -56,7 +56,7 @@ if [ "$1" = '-help' ] ; then echo " [ -mirror | -check ] [ -try-questionable ] [ -notimeout ]" echo " [ -longtimeout ] [ -curl-opt [:[:..]] ]" echo " [ -proxy [:] ] [ -proxy-auth [:] ]" - echo " [ -copy ] [ -move ]" + echo " [ -copy ] [ -move ] [ -cksumpatch ]" echo echo " -cfg download files for the given configuration" echo " -nock skip checksum checks (don't use lightly)" @@ -84,6 +84,7 @@ if [ "$1" = '-help' ] ; then echo " -move move files instead" echo " Default is to link files, if existent, from the old" echo " layout to the new one" + echo " -cksumpatch Patch the checksum in the .desc file after downloading." echo echo " ./scripts/Download -mk-cksum " echo " ./scripts/Download [ -list | -list-unknown | -list-missing | -list-cksums ]" @@ -131,7 +132,7 @@ this_is_the_2nd_run=0 mirror='' ; checkonly=0 ; altdir='' ; loop=1 tryques=0 ; nocheck=0 ; options='-this_is_the_2nd_run ' notimeout=0 ; curl_options='--disable-epsv --location' -altcopy=link +altcopy=link ; cksumpatch=0 ignore_xpkg=1 if [ -f download/Mirror ]; then mirror="`cat download/Mirror`" ; fi @@ -220,6 +221,7 @@ while [ $loop -eq 1 ] ; do -move) altcopy=move ; shift ;; -copy) altcopy=copy ; shift ;; + -cksumpatch) cksumpatch=1 ; shift ;; *) loop=0 ;; @@ -960,6 +962,9 @@ mapped_packages() { export xpkg=$pkg . src/pkgmapper packages $pkg + if [ $cksumpatch = 1 ]; then + ./scripts/Create-CkSumPatch $pkg | patch -p0 + fi done }