summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_make_check_src.sh
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-01-06 17:21:17 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-01-06 17:28:08 +0100
commitc3299c1b0d9a93020117afb4f7610944a1cae9fa (patch)
tree3c287de07e56fe5336566a572729cbe1efce2b6b /scripts/lib/ptxd_make_check_src.sh
parentebff4574b21f9a27c15ea99b7b9822dfc0697268 (diff)
downloadptxdist-c3299c1b0d9a93020117afb4f7610944a1cae9fa.tar.gz
ptxdist-c3299c1b0d9a93020117afb4f7610944a1cae9fa.tar.xz
ptxd_make_check_src: support multiple md5sums
this is usefull if there are multiple upstream tarballs with the same content but differen md5sums. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_check_src.sh')
-rw-r--r--scripts/lib/ptxd_make_check_src.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_check_src.sh b/scripts/lib/ptxd_make_check_src.sh
index 36f451a87..703bf45d6 100644
--- a/scripts/lib/ptxd_make_check_src.sh
+++ b/scripts/lib/ptxd_make_check_src.sh
@@ -15,6 +15,7 @@
ptxd_make_check_src_impl() {
local src="${1}"
local md5="${2}"
+ local md5sum
if [ -z "${src}" ]; then
ptxd_bailout "ptxd_make_check_src called without source file."
@@ -34,7 +35,10 @@ ptxd_make_check_src_impl() {
return
fi
- echo "${md5} ${src}" | md5sum --check > /dev/null 2>&1
+ for md5sum in ${md5}; do
+ echo "${md5sum} ${src}" | md5sum --check > /dev/null 2>&1 && return
+ done
+ return 1
}
export -f ptxd_make_check_src_impl