summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautoepatch.sh13
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