changeset 735:5379b253e8f2

common.subr: allow an empty fatal exit code and map to the default EX_USAGE (70)
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 07 Oct 2024 15:51:06 +0200
parents 4cd2fd7ccf76
children b308d8e4c8ad
files share/local-bsdtools/common.subr
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/share/local-bsdtools/common.subr	Mon Oct 07 14:25:43 2024 +0200
+++ b/share/local-bsdtools/common.subr	Mon Oct 07 15:51:06 2024 +0200
@@ -61,6 +61,7 @@
 
     if [ $# -ge 1 ]; then
         _ec="$1"
+        [ -z "$_ec" ] && _ec="${EX_USAGE}"
         shift
     else
         _ec=1