From: Bastian Dehn Date: Sat, 24 May 2025 10:13:43 +0000 (+0200) Subject: add check command yq X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=527194f905145936cb454c258e640c154443d72b;p=simple-backup.git add check command yq --- 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 $*