Fix os-cmd cross-distro compatibility

The os-cmd script tests for available commands in a non-portable
cross-platform way.  This fix replaces it with something much more
portable.

Change-Id: I65e76f7991d03ae2234030ab1e3fb02865b81c32
Closes-Bug: #1713460
This commit is contained in:
Michael Davies 2017-08-28 20:22:16 +09:30
parent e46193074d
commit 2acccc101e

View File

@ -21,7 +21,7 @@
__check_cmd_avail ()
{
if [ "z$(which $1)" == "z" ]; then
if hash ${1} &> /dev/null; then
echo "The command '$1' could not be found, exiting"
exit 1
fi