From 91c87959b9730407a98803e5e7560835d65276aa Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Mon, 15 Jul 2024 12:26:55 +1000 Subject: [PATCH] misc: check that astyle exists Signed-off-by: Ivan Velickovic --- misc/style-c.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/style-c.sh b/misc/style-c.sh index 3cf74d67..9f78e896 100755 --- a/misc/style-c.sh +++ b/misc/style-c.sh @@ -4,6 +4,13 @@ # # SPDX-License-Identifier: BSD-2-Clause # +set -e + +if ! command -v astyle >/dev/null 2>&1 +then + echo "astyle could not be found, it must be available to run the script." + exit 1 +fi # Format (in place) a list of files as C code. astyle --options="${0%/*}/astylerc" "$@"