diff options
-rwxr-xr-x | autoepatch.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/autoepatch.sh b/autoepatch.sh index b4f623f..9efcc9e 100755 --- a/autoepatch.sh +++ b/autoepatch.sh @@ -59,18 +59,23 @@ main() { done # Check if the patchset requires us to fail if the - # patch is not applied, if there's no patch_required - # function, just skip over - type patch_required &>/dev/null || continue + # patch is not applied. By default, don't. + if ! type patch_required &>/dev/null; then + patch_required() { return 1; } + fi if ! type patch_failed_msg &>/dev/null; then - patch_failed_msg() { + patch_failed_msg() { eerror "Failed patch ${patchset##*/}" } fi if [[ -z ${PATCH_APPLIED} ]]; then - patch_required && patch_failed_msg && exit 2 + if patch_required; then + patch_failed_msg && exit 2 + else + ewarn " failed, but patch not required, ignoring." + fi fi done <<<"${targets}" |