Prefer Unix Shell build-in 'hash' over 'which'

`which` is an external utility. `hash` or `command -v` are built-in
General Commands.

See http://stackoverflow.com/a/677212/863980

I chose `hash` here as `run-build.sh` is already using it.
This commit is contained in:
Adeel 2017-02-26 01:10:10 +02:00
parent 22fcc35797
commit ba72ff0edd

View file

@ -122,8 +122,8 @@ get_current_os_name() {
machine_has() {
eval $invocation
which "$1" > /dev/null 2>&1
hash "$1" > /dev/null 2>&1
return $?
}