diff options
author | asami <asami@FreeBSD.org> | 1996-12-23 10:49:35 +0800 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1996-12-23 10:49:35 +0800 |
commit | 99a65c9ea0a40a756329ef1c8b85443cf5e7084c (patch) | |
tree | e0dac3f252a73cccd75938b8ca4faeb23ba06d6e /Mk | |
parent | 5962e0986b41de0d9ec93987506b328bc8637f16 (diff) | |
download | freebsd-ports-gnome-99a65c9ea0a40a756329ef1c8b85443cf5e7084c.tar.gz freebsd-ports-gnome-99a65c9ea0a40a756329ef1c8b85443cf5e7084c.tar.zst freebsd-ports-gnome-99a65c9ea0a40a756329ef1c8b85443cf5e7084c.zip |
Suggested by: msmith
Add a little more sophistication to the md5 grep command.
Change the md5 checksum logic a bit. Now, the message is printed
out for every successfully/unsuccessfully matched checksum, and it
aborts at the end if there was a mismatch. Also, make missing checksum
and IGNORE file inconsistency fatal, as there is now no reason to have
a missing checksum.
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 66220f84f311..aae6baff20e5 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -6,7 +6,7 @@ # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. # -# $Id: bsd.port.mk,v 1.239 1996/12/17 12:20:53 asami Exp $ +# $Id: bsd.port.mk,v 1.240 1996/12/18 02:27:44 asami Exp $ # # Please view me with 4 column tabs! @@ -1237,7 +1237,7 @@ checksum: fetch (cd ${DISTDIR}; OK="true"; \ for file in ${_CKSUMFILES}; do \ CKSUM=`${MD5} < $$file`; \ - CKSUM2=`${GREP} "($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + CKSUM2=`${GREP} "^MD5 ($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ if [ "$$CKSUM2" = "" ]; then \ ${ECHO_MSG} ">> No checksum recorded for $$file."; \ OK="false"; \ @@ -1245,9 +1245,11 @@ checksum: fetch ${ECHO_MSG} ">> Checksum for $$file is set to IGNORE in md5 file even though"; \ ${ECHO_MSG} " the file is not in the "'$$'"{IGNOREFILES} list."; \ OK="false"; \ - elif [ "$$CKSUM" != "$$CKSUM2" ]; then \ + elif [ "$$CKSUM" = "$$CKSUM2" ]; then \ + ${ECHO_MSG} ">> Checksum OK for $$file."; \ + else \ ${ECHO_MSG} ">> Checksum mismatch for $$file."; \ - exit 1; \ + OK="false"; \ fi; \ done; \ for file in ${_IGNOREFILES}; do \ @@ -1261,11 +1263,11 @@ checksum: fetch OK="false"; \ fi; \ done; \ - if [ "$$OK" = "true" ]; then \ - ${ECHO_MSG} "Checksums OK."; \ - else \ - ${ECHO_MSG} "There may be some inconsistencies, make sure the Makefile and md5 file"; \ - ${ECHO_MSG} "(\"${MD5_FILE}\") are up to date."; \ + if [ "$$OK" != "true" ]; then \ + ${ECHO_MSG} "Make sure the Makefile and md5 file (${MD5_FILE})"; \ + ${ECHO_MSG} "are up to date. If you want to override this check, type"; \ + ${ECHO_MSG} "\"make NO_CHECKSUM=yes [other args]\"."; \ + exit 1; \ fi) ; \ fi .endif |