summaryrefslogtreecommitdiff
path: root/mk/checksum
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-07-13 16:44:14 +0000
committerjlam <jlam@pkgsrc.org>2006-07-13 16:44:14 +0000
commit8d03d36b6a5f0e02b6fd3dcede53194216ec00e4 (patch)
tree1bfe3ab6c0153abbb5d3f88ee3d3915d3127bfe9 /mk/checksum
parent7ef83e7139a1bd2e17efb43329db73bb51a4d662 (diff)
downloadpkgsrc-8d03d36b6a5f0e02b6fd3dcede53194216ec00e4.tar.gz
* Fix bug when more than one file needed to be checksummed.
* Avoid shell differences between /bin/sh and Korn shell by using: while read line; do list; done < FILE instead of cat FILE | while read line; do list; done
Diffstat (limited to 'mk/checksum')
-rwxr-xr-xmk/checksum/checksum7
1 files changed, 3 insertions, 4 deletions
diff --git a/mk/checksum/checksum b/mk/checksum/checksum
index 9f4d7b4b418..4255f9d5d52 100755
--- a/mk/checksum/checksum
+++ b/mk/checksum/checksum
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: checksum,v 1.5 2006/07/13 16:23:14 jlam Exp $
+# $NetBSD: checksum,v 1.6 2006/07/13 16:44:14 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -115,7 +115,6 @@ if ${TEST} -z "$digestcmd"; then
exit 1
fi
-${CAT} $distinfo |
{ exitcode=0
while read d_alg d_file d_equals d_checksum; do
case "$d_alg" in
@@ -133,7 +132,7 @@ ${CAT} $distinfo |
${TEST} -n "$tmp" || eval "_alg_${d_alg}=\"$files\""
d_file="${d_file#\(}"; d_file="${d_file%\)}"
- for file in "$files"; do
+ for file in $files; do
${TEST} "$d_file" = "$file" || continue
eval "tmp=\"\$_alg_${d_alg}\""
@@ -177,4 +176,4 @@ ${CAT} $distinfo |
done
fi
fi
- exit $exitcode; }
+ exit $exitcode; } < $distinfo