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
|
||||
fi
|
||||
|
||||
if [[ -n "$(which shasum)" ]]
|
||||
if [[ -x "$(which shasum)" ]]
|
||||
then
|
||||
sha="$(shasum -a 256 "$CACHED_LOCATION" | cut -d' ' -f1)"
|
||||
elif [[ -n "$(which sha256sum)" ]]
|
||||
elif [[ -x "$(which sha256sum)" ]]
|
||||
then
|
||||
sha="$(sha256sum "$CACHED_LOCATION" | cut -d' ' -f1)"
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user