fix program_exists ( LOL )

This commit is contained in:
Jorge Morante 2017-10-06 18:46:25 +02:00
parent 70f914ecba
commit 932b15dda9
1 changed files with 5 additions and 3 deletions

View File

@ -32,10 +32,12 @@ function version_minor() {
function program_exists() {
local prog="$1"
if [[ $(which "$prog" &> /dev/null) ]]; then
echo "0"
else
which "$prog" &> /dev/null
if [[ $? == "0" ]]; then
echo "1"
else
echo "0"
fi
}