From 80e1e559dc73992906a74cc854122211f8706f19 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Thu, 5 Oct 2023 17:55:09 -0400 Subject: [PATCH] Abort on all errors --- fgen.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fgen.sh b/fgen.sh index fcc1678..99bc69d 100755 --- a/fgen.sh +++ b/fgen.sh @@ -3,6 +3,9 @@ # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2023 Hugo Villeneuve +# Abort on all errors +set -e + PROG_NAME=$(basename $0) # Set default values @@ -62,10 +65,9 @@ function get_frame_id() frame=$(echo "${1}" | grep -e "label:[0-9]" | ${SED} "s/label:\([0-9]\+\),.*/\1/g") if [ x"${frame}" = x"" ]; then - return 1 + echo "" else echo "${frame}" - return 0 fi } -- 2.20.1