commit f9d4a959c8d84af94aaf5eaa64168bd2d70a61d2
parent 05f44c30f71e6da951bbae40483eb65a3e778e7a
Author: Daniel Bainton <dpb@driftaway.org>
Date: Thu, 15 May 2014 12:13:01 +0300
Use SUM from the config.mk instead of plain sha512sum
This won't be specific to sha512sum now, can use any sum tool that
supports checking the same way.
And one can specify more arguments to the command, eg. --status for GNU
coretools sha512sum to make things quiet.
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/config.mk b/config.mk
@@ -19,6 +19,7 @@ DFLDIR = ${ETCDIR}/default
MANDIR = ${PREFIX}/share/man
INSTALL = /usr/bin/install
+SUM = sha512sum
CPPFLAGS = -D_BSD_SOURCE -D_GNU_SOURCE
CFLAGS = ${CPPFLAGS}
diff --git a/mk.fetch b/mk.fetch
@@ -13,7 +13,7 @@ fetch-http:QV:
if test x"$pkgsrc" = x""; then
pkgsrc=`basename $url`
fi
- t=$(cat checksums | sha512sum -c && echo ok || echo fail)
+ t=$(cat checksums | $SUM -c && echo ok || echo fail)
if test "$(echo $t | grep ok)" = ""; then
rm -f "$pkgsrc"
wget -c "$url" -O "$pkgsrc"