From 6a6672c57e814a93fca1db8dc79d936d2a22eaa4 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 8 May 2020 13:43:01 -0700 Subject: Detect sha256 tool automatically --- pkg/git/fetch.sh | 6 ++---- pkg/linux-headers/fetch.sh | 6 ++---- pkg/openbsd/fetch.sh | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) (limited to 'pkg') diff --git a/pkg/git/fetch.sh b/pkg/git/fetch.sh index 9b17a0d5..326e7338 100644 --- a/pkg/git/fetch.sh +++ b/pkg/git/fetch.sh @@ -1,5 +1,3 @@ -: "${SHA256SUM:=sha256sum}" - set -e sh scripts/fetch-git.sh "$@" @@ -11,9 +9,9 @@ if [ -e src/man ] ; then rm -rf src/man fi -if ! $SHA256SUM -c sha256 2>/dev/null ; then +if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then curl -L -O -K url - $SHA256SUM -c sha256 + sh "$OLDPWD/scripts/checksum.sh" -c sha256 fi read -r _ archive /dev/null ; then +if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then curl -L -K url -O - $SHA256SUM -c sha256 + sh "$OLDPWD/scripts/checksum.sh" -c sha256 fi read -r _ archive /dev/null ; then +if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then curl -L -K url -O - $SHA256SUM -c sha256 + sh "$OLDPWD/scripts/checksum.sh" -c sha256 fi sh "$OLDPWD/scripts/extract.sh" src.tar.gz -s ',^,src/,' \ -- cgit v1.2.3