Use recommended way of detecting command in $PATH

See https://stackoverflow.com/a/677212 for explanation.
This commit is contained in:
Marek Kubica 2015-06-14 13:00:08 +02:00
parent ea6b258660
commit dfc57b8d35

View file

@ -23,9 +23,9 @@ else
cygwin=false
fi
if hash shasum >/dev/null 2>&1; then
SUM="shasum -"
elif hash sha1sum >/dev/null 2>&1; then
if command -v shasum >/dev/null 2>&1; then
SUM="shasum"
elif command -v sha1sum >/dev/null 2>&1; then
SUM="sha1sum"
fi