diff options
author | 2007-01-07 20:20:55 +0000 | |
---|---|---|
committer | 2007-01-07 20:20:55 +0000 | |
commit | 52a8f774e6f48bf8322cb1a5030fc5a6c920ae3c (patch) | |
tree | 1869d2459a8072975d2371e543367f33d0210b6e | |
parent | minor english cleanups (diff) | |
download | autoepatch-52a8f774e6f48bf8322cb1a5030fc5a6c920ae3c.tar.gz autoepatch-52a8f774e6f48bf8322cb1a5030fc5a6c920ae3c.tar.bz2 autoepatch-52a8f774e6f48bf8322cb1a5030fc5a6c920ae3c.zip |
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
-rwxr-xr-x | autoepatch.sh | 13 |
1 files 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 |