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:
parent
e46193074d
commit
2acccc101e
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
__check_cmd_avail ()
|
__check_cmd_avail ()
|
||||||
{
|
{
|
||||||
if [ "z$(which $1)" == "z" ]; then
|
if hash ${1} &> /dev/null; then
|
||||||
echo "The command '$1' could not be found, exiting"
|
echo "The command '$1' could not be found, exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user