- FIX: That's what I get for wanting to use fancy or/and piping, back to basics (Now using explicit rc test to decide whether to quit)

This commit is contained in:
Daniel Poggenpohl 2019-02-01 23:11:22 +01:00
parent b0abd1fbf3
commit 6857e937e2
1 changed files with 5 additions and 2 deletions

View File

@ -12,8 +12,11 @@ set -e
function validateToolPresence
{
local TOOLNAME=$1
which ${TOOLNAME} >/dev/null || echo "${TOOLNAME} is not on the path. Exiting..."
exit 1
which ${TOOLNAME} >/dev/null
if [ $? -ne 0 ]; then
echo "${TOOLNAME} is not on the path. Exiting..."
exit 1
fi
}
# Validates that all used tools are present; exits when any is not found