From 52a8f774e6f48bf8322cb1a5030fc5a6c920ae3c Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Sun, 7 Jan 2007 20:20:55 +0000 Subject: Replace 'Testing' with 'Applying', use ebegin/eend to give the status of patching, and make sure that if the trigger action works the patch is considered applied. svn path=/trunk/; revision=40 --- autoepatch.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/autoepatch.sh b/autoepatch.sh index 455789a..897a125 100755 --- a/autoepatch.sh +++ b/autoepatch.sh @@ -46,10 +46,10 @@ main() { targets="$(patch_targets)" [[ -z ${targets} ]] && exit 0 - einfo "Testing ${patchset##*/} ..." + einfo "Applying ${patchset##*/} ..." while read target; do - einfo " on ${target##$(pwd)/} ..." + ebegin " on ${target##$(pwd)/} ..." for patch in "${patchset}"/*.patch; do if try_patch "${target}" "${patch}"; then @@ -59,7 +59,9 @@ main() { done if type patch_trigger_action &>/dev/null; then - patch_trigger_action "${target}" + if patch_trigger_action "${target}"; then + PATCH_APPLIED="yes" + fi fi # Check if the patchset requires us to fail if the @@ -74,7 +76,10 @@ main() { } fi - if [[ -z ${PATCH_APPLIED} ]]; then + if [[ -n ${PATCH_APPLIED} ]]; then + eend 0 + else + eend 1 if patch_required; then patch_failed_msg && exit 2 else -- cgit v1.2.3-65-gdbad