Skip to content

Commit

Permalink
get exit status of uefi_cd.sh and really exit if in error
Browse files Browse the repository at this point in the history
also fix 'find' calls re #1015
  • Loading branch information
01micko committed May 25, 2017
1 parent efd0a66 commit 2ed6bf1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions woof-code/3builddistro-Z
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions woof-code/support/uefi_cd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2ed6bf1

Please sign in to comment.