vendor-install: check -x on output of which
This works around older versions of `which`, which return a string on failure.
This commit is contained in:
parent
fdd9972aa7
commit
b8fee7fe4d
@ -76,10 +76,10 @@ fetch() {
|
|||||||
trap - SIGINT
|
trap - SIGINT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$(which shasum)" ]]
|
if [[ -x "$(which shasum)" ]]
|
||||||
then
|
then
|
||||||
sha="$(shasum -a 256 "$CACHED_LOCATION" | cut -d' ' -f1)"
|
sha="$(shasum -a 256 "$CACHED_LOCATION" | cut -d' ' -f1)"
|
||||||
elif [[ -n "$(which sha256sum)" ]]
|
elif [[ -x "$(which sha256sum)" ]]
|
||||||
then
|
then
|
||||||
sha="$(sha256sum "$CACHED_LOCATION" | cut -d' ' -f1)"
|
sha="$(sha256sum "$CACHED_LOCATION" | cut -d' ' -f1)"
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user