aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Palmer <gpalmer@FreeBSD.org>1995-01-17 07:33:08 +0800
committerGary Palmer <gpalmer@FreeBSD.org>1995-01-17 07:33:08 +0800
commit0783af702d1e0efbbc2bc6a1f4bc186fd1b4595d (patch)
tree36e8cd2e740773ff0a71a845c51ffb97ef6cbfec
parente5214215523ea45faca1b9dee3c082f6ae5a76ef (diff)
downloadfreebsd-ports-0783af702d1e0efbbc2bc6a1f4bc186fd1b4595d.tar.gz
freebsd-ports-0783af702d1e0efbbc2bc6a1f4bc186fd1b4595d.tar.zst
freebsd-ports-0783af702d1e0efbbc2bc6a1f4bc186fd1b4595d.zip
Correct a small problem in that when there isn't a checksum for that
particular file, but there is a files/md5, it reports that it failed the checksum
Notes
Notes: svn path=/head/; revision=789
-rw-r--r--Mk/bsd.port.mk15
1 files changed, 11 insertions, 4 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 1a000ce78c47..7a1d1cfd1830 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3,7 +3,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.101 1995/01/11 08:53:28 asami Exp $
+# $Id: bsd.port.mk,v 1.102 1995/01/12 02:29:42 ache Exp $
#
# Please view me with 4 column tabs!
@@ -517,16 +517,23 @@ checksum: fetch
@if [ ! -f ${MD5_FILE} ]; then \
echo ">> No MD5 checksum file."; \
else \
- (cd ${DISTDIR}; \
+ (cd ${DISTDIR}; OK="true"; \
for file in ${DISTFILES}; do \
CKSUM=`${MD5} $$file | awk '{print $$4}'`; \
CKSUM2=`grep "($$file)" ${MD5_FILE} | awk '{print $$4}'`; \
- if [ "$$CKSUM" != "$$CKSUM2" ]; then \
+ if [ "$$CKSUM2" = "" ]; then \
+ echo ">> No checksum recorded for $$file"; \
+ OK="false"; \
+ elif [ "$$CKSUM" != "$$CKSUM2" ]; then \
echo ">> Checksum mismatch for $$file"; \
exit 1; \
fi; \
done); \
- echo "Checksums OK."; \
+ if [ "$$OK" = "true" ]; then \
+ echo "Checksums OK."; \
+ else \
+ echo "Checksums OK for files that have them."; \
+ fi; \
fi
.endif