adjust options parsing for new error handling method
authorPatrick Schleizer <adrelanos@whonix.org>
Wed, 25 Oct 2023 17:14:04 +0000 (13:14 -0400)
committerPatrick Schleizer <adrelanos@whonix.org>
Thu, 7 Dec 2023 18:51:55 +0000 (13:51 -0500)
grml-debootstrap

index 97409bc..55bb68c 100755 (executable)
@@ -354,11 +354,10 @@ fi
 # cmdline handling {{{
 CMDLINE_OPTS=mirror:,iso:,release:,target:,mntpoint:,debopt:,defaultinterfaces,interactive,nodebootstrap,nointerfaces,nokernel,nopackages,filesystem:,config:,confdir:,packages:,chroot-scripts:,scripts:,post-scripts:,pre-scripts:,debconf:,vm,vmfile,vmsize:,vmefi,keep_src_list,hostname:,password:,nopassword,grmlrepos,backportrepos,bootappend:,grub:,efi:,arch:,insecure,verbose,help,version,force,debug,contrib,non-free,remove-configs,sshcopyid,sshcopyauth
 
-_opt_temp=$(getopt --name grml-debootstrap -o +m:i:r:t:p:c:d:vhV --long \
-  $CMDLINE_OPTS -- "$@")
-
-if [ $? != 0 ]; then
-  eerror "Try 'grml-debootstrap --help' for more information."; eend 1; exit 1
+if ! _opt_temp=$(getopt --name grml-debootstrap -o +m:i:r:t:p:c:d:vhV --long \
+  $CMDLINE_OPTS -- "$@"); then
+  eerror "Try 'grml-debootstrap --help' for more information."
+  bailout 1
 fi
 eval set -- "$_opt_temp"