From 8d5702d93a383b5c2591e90a972e873bee5793a5 Mon Sep 17 00:00:00 2001 From: ahtlon Date: Sat, 25 Oct 2025 22:16:03 +0200 Subject: [PATCH] Add command testing --- machines/overwatch/pull_info.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/machines/overwatch/pull_info.sh b/machines/overwatch/pull_info.sh index 37244b3..f1824bc 100644 --- a/machines/overwatch/pull_info.sh +++ b/machines/overwatch/pull_info.sh @@ -1,6 +1,13 @@ #!/usr/bin/env bash set -o pipefail - +for command in "jq" "xq" "grep" "curl" "sed" +do + if ! command -v $command >/dev/null 2>&1 + then + echo "$command could not be found" + exit 1 + fi +done #Functions--------------- get_cookie () { if [[ $1 == "-d" ]]; then