From 3fefce3686db4fbd15b187be2d458d33c2cce0ad Mon Sep 17 00:00:00 2001 From: Nick Curran Date: Sat, 5 Oct 2024 12:02:53 -0500 Subject: [PATCH] Echo failed dependency in add-to-bin --- script/setup.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/script/setup.sh b/script/setup.sh index f233227f..66927005 100644 --- a/script/setup.sh +++ b/script/setup.sh @@ -4,14 +4,19 @@ set -u # Treat unset variables and parameters other than the special parameters set -o pipefail # Any command failed in the pipe fails the whole pipe # set -x # Print shell commands as they are executed (or you can try -v which is less verbose) +# Look for a given dependency, failing the whole script if not found. +# If found, create a mapping script to that dependency in the .deps/bin folder add-to-bin() { - /usr/bin/which "$1" &> /dev/null && \ - cat > ".deps/bin/${2:-$1}" < /dev/null || (echo "Dependency $1 not found" && exit 1) + + cat > ".deps/bin/${2:-$1}" <