From: Hugo Villeneuve Date: Thu, 5 Oct 2023 21:55:09 +0000 (-0400) Subject: Abort on all errors X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=80e1e559dc73992906a74cc854122211f8706f19;p=fgen.git Abort on all errors --- 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 }