diff options
-rwxr-xr-x | autoepatch.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/autoepatch.sh b/autoepatch.sh index ffa12af..1b1dd07 100755 --- a/autoepatch.sh +++ b/autoepatch.sh @@ -68,12 +68,18 @@ main() { fi if [[ -z ${PATCH_APPLIED} ]]; then - patch_required && patch_failed_msg && exit 1 + patch_required && patch_failed_msg && exit 2 fi done <<<"${targets}" exit 0 - ) || eerror "Error in subshell" + ) + + case $? in + 0) ;; # All gone well + 1) eerror "Error in subshell"; return 1 ;; # Something didn't go well + 2) return 1;; # The patch failed to apply, already announced. + esac done IFS="${save_IFS}" |