Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git committed Jul 20, 2023
1 parent 2356708 commit e6aeda7
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions zip-content/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e6aeda7

Please sign in to comment.