mirror of
https://git.centos.org/centos-git-common.git
synced 2025-02-23 16:22:56 +00:00
get_sources: download source again if file checksum has changed
This functionality requires use of option -c. Signed-off-by: Tuomo Soini <tis@foobar.fi>
This commit is contained in:
parent
696c29f5c9
commit
bd83a7926b
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
||||||
# Mike McLean <mikem@redhat.com>
|
# Mike McLean <mikem@redhat.com>
|
||||||
# Pat Riehecky <riehecky@fnal.gov>
|
# Pat Riehecky <riehecky@fnal.gov>
|
||||||
# Tyler Parsons <tparsons@fnal.gov>
|
# Tyler Parsons <tparsons@fnal.gov>
|
||||||
|
# Tuomo Soini <tis@foobar.fi>
|
||||||
|
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
@ -200,6 +201,13 @@ while read -r fsha fname ; do
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ -e ${fname} -a ${CHECK} -eq 1 ]; then
|
||||||
|
# check hash sum and force download if wrong
|
||||||
|
downsum=$(${hashType} ${fname} | awk '{print $1}')
|
||||||
|
if [ "${fsha}" != "${downsum}" ]; then
|
||||||
|
rm -f ${fname}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [ ! -e "${fname}" ]; then
|
if [ ! -e "${fname}" ]; then
|
||||||
for br in "${branches[@]}"
|
for br in "${branches[@]}"
|
||||||
do
|
do
|
||||||
|
|
Loading…
Add table
Reference in a new issue