From e6aeda7c45bdaab9d0b8df5f35b2d5a364d4328e Mon Sep 17 00:00:00 2001 From: ale5000 <15793015+ale5000-git@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:45:08 +0200 Subject: [PATCH] Minor change --- zip-content/customize.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/zip-content/customize.sh b/zip-content/customize.sh index 2887725e..47f2ed23 100644 --- a/zip-content/customize.sh +++ b/zip-content/customize.sh @@ -235,19 +235,25 @@ set_perm_safe() package_extract_file() { - unzip -o -p -qq "${ZIPFILE:?}" "${1:?}" 1> "${2:?}" && test -s "${2:?}" || { - rm -f -- "${2:?}" || true - ui_error "Failed to extract the file '${1}' from this archive" 82 - } + { + unzip -o -p -qq "${ZIPFILE:?}" "${1:?}" 1> "${2:?}" && test -s "${2:?}" + } || + { + rm -f -- "${2:?}" || true + ui_error "Failed to extract the file '${1}' from this archive" 82 + } } package_extract_file_may_fail() { - unzip -o -p -qq "${ZIPFILE:?}" "${1:?}" 1> "${2:?}" && test -s "${2:?}" || { - rm -f -- "${2:?}" || true - ui_warning "Failed to extract the file '${1}' from this archive" - return 1 - } + { + unzip -o -p -qq "${ZIPFILE:?}" "${1:?}" 1> "${2:?}" && test -s "${2:?}" + } || + { + rm -f -- "${2:?}" || true + ui_warning "Failed to extract the file '${1}' from this archive" + return 1 + } } package_extract_file_safe()