From 527194f905145936cb454c258e640c154443d72b Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 24 May 2025 12:13:43 +0200 Subject: [PATCH] add check command yq --- backup | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/backup b/backup index 923d205..191419a 100755 --- a/backup +++ b/backup @@ -1,5 +1,14 @@ #!/bin/bash -# vim: tabstop=8 colorcolumn=80 + +errlog() +{ + local lastexit=$? + local msg="$1" + + echo "❌ ERROR: $msg" + echo "🛑 EXIT $lastexit" + return $lastext +} ## @fn usage() ## @brief Anzeige von der Hilfe @@ -449,6 +458,9 @@ main() LIGHTPURPLE="\e[1;35m" LIGHTGREEN="\e[1;32m" RESET="\e[0m" + + command -v yq > /dev/null || errlog "command yq not found" || return $? + head -2 license echo ReadArguments $* -- 2.47.3