@@ -322,7 +322,7 @@ find_snapshot()
#fetch_rsync ${remote_snapshots}/md5sums
# Search for the snapshot in the md5sum file, and filter out anything we don't want.
- snapshot="`grep $1 ${local_snapshots}/${dir}md5sums | egrep -v "\.asc|\.diff|\.txt|xdelta" | cut -d ' ' -f 3`"
+ snapshot="`grep $1 ${local_snapshots}/md5sums | egrep -v "\.asc|\.diff|\.txt|xdelta" | cut -d ' ' -f 3`"
if test x"${snapshot}" != x; then
if test `echo "${snapshot}" | grep -c $1` -gt 1; then
error "Too many results for $1!"
@@ -33,12 +33,12 @@ fetch()
if test x"$1" = x"md5sums"; then
# Move the existing file to force a fresh copy to be downloaded.
# Otherwise this file can get stale, and new tarballs not found.
- if test -f ${local_snapshots}/${dir}md5sums; then
- cp -f ${local_snapshots}/${dir}md5sums ${local_snapshots}/${dir}md5sums.bak
+ if test -f ${local_snapshots}/md5sums; then
+ cp -f ${local_snapshots}/md5sums ${local_snapshots}/md5sums.bak
fi
- fetch_http ${dir}md5sums
- if test ! -s ${dir}md5sums; then
- cp -f ${local_snapshots}/${dir}md5sums.bak ${local_snapshots}/${dir}md5sums
+ fetch_http md5sums
+ if test ! -s md5sums; then
+ cp -f ${local_snapshots}/md5sums.bak ${local_snapshots}/md5sums
fi
return $?
fi
@@ -175,7 +175,7 @@ check_md5sum()
local getfile=`echo ${1}`
newsum="`md5sum ${local_snapshots}/$1 | cut -d ' ' -f 1`"
- oldsum="`grep ${getfile} ${local_snapshots}/${dir}md5sums | cut -d ' ' -f 1`"
+ oldsum="`grep ${getfile} ${local_snapshots}/md5sums | cut -d ' ' -f 1`"
# if there isn't an entry in the md5sum file, we're probably downloading
# something else that's less critical.
if test x"${oldsum}" = x; then
@@ -215,7 +215,7 @@ extract()
fi
if test `echo $1 | egrep -c "\.gz|\.bz2|\.xz"` -eq 0; then
- local file="`grep $1 ${local_snapshots}/${dir}md5sums | egrep -v "\.asc|\.txt" | cut -d ' ' -f 3 | cut -d '/' -f 2`"
+ local file="`grep $1 ${local_snapshots}/md5sums | egrep -v "\.asc|\.txt" | cut -d ' ' -f 3 | cut -d '/' -f 2`"
else
local file="`echo $1 | cut -d '/' -f 2`"
fi
@@ -4,19 +4,15 @@
testcode()
{
- # force downloading the md5sum file, as it changes frequently
- rm -f ${local_snapshots}/testcode/md5sums
- fetch_http testcode/md5sums
-
rm -f ${local_snapshots}/testcode/ChangeLog
fetch_http testcode/ChangeLog
- if test -f ${local_snapshots}/testcode/md5sums; then
- files="`cat ${local_snapshots}/testcode/md5sums | cut -d ' ' -f3`"
+ if test -f ${local_snapshots}/md5sums; then
+ files="`grep testcode ${local_snapshots}/md5sums | cut -d ' ' -f3`"
for i in ${files}; do
- build testcode/$i
+ build $i
if test $? -gt 0; then
- error "Couldn't build testcode/$i!"
+ error "Couldn't build $i!"
return 1
fi
done
From: "Ryan S. Arnold" <ryan.arnold@linaro.org> The ${dir}/ specific md5sums files are redundant with the snapshots/md5sums file and should be removed. This includes the testcode/md5sums files. --- lib/common.sh | 2 +- lib/fetch.sh | 14 +++++++------- lib/testcode.sh | 12 ++++-------- 3 files changed, 12 insertions(+), 16 deletions(-)