diff options
author | 2006-12-18 10:28:14 +0000 | |
---|---|---|
committer | 2006-12-18 10:28:14 +0000 | |
commit | e83d3a862b8d78cbec2469e4b7ced7a08ac2885b (patch) | |
tree | 054e39c837e90eaa689f60be8be43f37939ea421 | |
parent | Make the fbsd-conf patch apply everywhere, but make it required only on FreeB... (diff) | |
download | autoepatch-e83d3a862b8d78cbec2469e4b7ced7a08ac2885b.tar.gz autoepatch-e83d3a862b8d78cbec2469e4b7ced7a08ac2885b.tar.bz2 autoepatch-e83d3a862b8d78cbec2469e4b7ced7a08ac2885b.zip |
Output a warning if the patch failed to apply but it's not required.
svn path=/trunk/; revision=13
-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}" |