Correctly throwing error on unsatisfied dependency
This commit is contained in:
parent
1751409f53
commit
a17a7b0f7e
1 changed files with 5 additions and 1 deletions
6
build.sh
6
build.sh
|
@ -6,7 +6,11 @@ WORKDIR=$(pwd)
|
|||
|
||||
# ---
|
||||
dep () {
|
||||
which "$1" || (echo "$1 not found" && exit 1)
|
||||
if ! which "$1" 2>/dev/null
|
||||
then
|
||||
echo "$1 not found"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
clone () {
|
||||
|
|
Loading…
Reference in a new issue