From 3c7d1aadfbe558bdee90ff73ff63a721d1db7da5 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Wed, 15 Apr 2020 18:44:00 -0700 Subject: Allow overriding sha256 command through SHA256SUM This way, oasis can be bootstrapped on other operating systems by setting SHA256SUM='shasum -a 256'. --- pkg/git/fetch.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pkg/git') diff --git a/pkg/git/fetch.sh b/pkg/git/fetch.sh index 48edce2c..7e257f44 100644 --- a/pkg/git/fetch.sh +++ b/pkg/git/fetch.sh @@ -1,3 +1,6 @@ +: ${SHA256SUM:=sha256sum} +: ${PAXREAD:=pax -r} + set -e (. ./scripts/fetch-git.sh "$@") @@ -9,10 +12,10 @@ if [ -e src/man ] ; then rm -rf src/man fi -if ! sha256sum -c sha256 2>/dev/null ; then +if ! $SHA256SUM -c sha256 2>/dev/null ; then curl -L -O -K url - sha256sum -c sha256 + $SHA256SUM -c sha256 fi read -r checksum archive