From 2ed6bf1a233628c82d0ddf3ffd4b863e0b919afe Mon Sep 17 00:00:00 2001 From: 01micko <01micko@gmail.com> Date: Thu, 25 May 2017 18:33:45 +1000 Subject: [PATCH] get exit status of uefi_cd.sh and really exit if in error also fix 'find' calls re #1015 --- woof-code/3builddistro-Z | 7 +++++++ woof-code/support/uefi_cd.sh | 16 ++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/woof-code/3builddistro-Z b/woof-code/3builddistro-Z index d4be0eed860..2085cae33ad 100755 --- a/woof-code/3builddistro-Z +++ b/woof-code/3builddistro-Z @@ -1923,6 +1923,13 @@ if [ "$SDFLAG" = "" ];then #120506 UFLG=-uefi WOOF_OUTPUT="woof-output-${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}${UFLG}${XTRA_FLG}" ../support/uefi_cd.sh + uret=$? + if [ $uret -ne 0 ];then + echo "uefi_cd.sh exited with $uret exit value. +Aborting +Check the script support/uefi_cd.sh to see what this means." + exit 1 + fi elif [ "$G4DOS_ISO" = 'yes' ];then WOOF_OUTPUT="woof-output-${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}${XTRA_FLG}" #woodenshoe-wi idea. #140619 [ -d ../$WOOF_OUTPUT ] || mkdir -p ../$WOOF_OUTPUT diff --git a/woof-code/support/uefi_cd.sh b/woof-code/support/uefi_cd.sh index 861a247490d..a317aa01895 100755 --- a/woof-code/support/uefi_cd.sh +++ b/woof-code/support/uefi_cd.sh @@ -41,13 +41,13 @@ mk_efi_img() { } # RESOURCES=`find ../ -type d -name UEFI -maxdepth 2` -RESOURCES=`find ../sandbox3/rootfs-complete/usr/share/ -type d -name 'grub2-efi' -maxdepth 2` -ISOLINUX=`find ../sandbox3/rootfs-complete/usr -type f -name 'isolinux.bin' -maxdepth 3` -VESAMENU=`find ../sandbox3/rootfs-complete/usr -type f -name 'vesamenu.c32' -maxdepth 3` -FIXUSB=`find ../sandbox3/rootfs-complete/usr -type f -name 'fix-usb.sh' -maxdepth 2` +RESOURCES=`find ../sandbox3/rootfs-complete/usr/share/ -maxdepth 2 -type d -name 'grub2-efi'` +ISOLINUX=`find ../sandbox3/rootfs-complete/usr -maxdepth 3 -type f -name 'isolinux.bin'` +VESAMENU=`find ../sandbox3/rootfs-complete/usr -maxdepth 3 -type f -name 'vesamenu.c32'` +FIXUSB=`find ../sandbox3/rootfs-complete/usr -maxdepth 2 -type f -name 'fix-usb.sh'` GRUBNAME=grubx64.efi NEWNAME=bootx64.efi -GRUB2=`find ../sandbox3/rootfs-complete/usr/share -type f -name "${GRUBNAME}*" -maxdepth 2` +GRUB2=`find ../sandbox3/rootfs-complete/usr/share -maxdepth 2 -type f -name "${GRUBNAME}*"` BUILD=../sandbox3/build HELP=${BUILD}/help MSG1=../boot/boot-dialog/help.msg @@ -61,9 +61,9 @@ WOOF_OUTPUT="woof-output-${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}${SCSIFLAG}${UFL [ -d ../$WOOF_OUTPUT ] || mkdir -p ../$WOOF_OUTPUT OUT=../${WOOF_OUTPUT}/${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}${SCSIFLAG}${UFLG}${XTRA_FLG}.iso -[ -z "$ISOLINUX" ] && echo "Can't find isolinux" && exit -[ -z "$VESAMENU" ] && echo "Can't find vesamenu" && exit -[ -z "$GRUB2" ] && echo "Can't find Grub2" && exit +[ -z "$ISOLINUX" ] && echo "Can't find isolinux" && exit 32 +[ -z "$VESAMENU" ] && echo "Can't find vesamenu" && exit 33 +[ -z "$GRUB2" ] && echo "Can't find Grub2" && exit 34 # custom backdrop pic=puppy