From 2db2081438edc7dec1d673a4604fa23c4abf8232 Mon Sep 17 00:00:00 2001 From: Gary Palmer Date: Mon, 16 Jan 1995 23:33:08 +0000 Subject: [PATCH] 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 --- share/mk/bsd.port.mk | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk index 1a000ce78c47..7a1d1cfd1830 100644 --- a/share/mk/bsd.port.mk +++ b/share/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