From 6035149bcbece479681e57cd18a38ec4b647116d Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 2 May 2024 02:07:09 +0200 Subject: [PATCH] Update define.sh --- src/define.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/define.sh b/src/define.sh index 7162eb6..0b49cb6 100644 --- a/src/define.sh +++ b/src/define.sh @@ -692,7 +692,8 @@ prepareXP() { configXP "$dir" && return 0 - error "Failed to generate XP configuration files!" && exit 66 + error "Failed to generate XP configuration files!" + return 1 } prepareLegacy() { @@ -707,11 +708,10 @@ prepareLegacy() { len=$(isoinfo -d -i "$iso" | grep "Nsect " | grep -o "[^ ]*$") offset=$(isoinfo -d -i "$iso" | grep "Bootoff " | grep -o "[^ ]*$") - if ! dd "if=$iso" "of=$dir/$ETFS" bs=2048 "count=$len" "skip=$offset" status=none; then - error "Failed to extract boot image from ISO!" && exit 67 - fi + dd "if=$iso" "of=$dir/$ETFS" bs=2048 "count=$len" "skip=$offset" status=none && return 0 - return 0 + error "Failed to extract boot image from ISO!" + return 1 } return 0