From 2da46b65a15a0e5a8aa7c6f96acc2c41524faa07 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 6 May 2020 20:20:33 -0400 Subject: xorriso: properly detect getopt errors --- src/xorriso-usb.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xorriso-usb.sh b/src/xorriso-usb.sh index 594ff78..e6e4778 100755 --- a/src/xorriso-usb.sh +++ b/src/xorriso-usb.sh @@ -187,8 +187,9 @@ outdev= GPG_INPUT_DIR= child_dir=$samizdat_child_dir/child.$$ -eval set -- "$(getopt -o '' --long bootloader,reuse-child:,adam,usb,detach,in:,out:,test -n "$0" -- "$@")" || - die 'getopt error' +OPT=$(getopt -o '' --long 'bootloader,reuse-child:,adam,usb,detach,in:,out:,test' -n "$0" -- "$@") || die 'getopt error' +eval set -- "$OPT" +unset OPT ADAM=; DETACH=; USB=y while [ $# -gt 0 ]; do -- cgit v1.2.3