/[autoepatch]/trunk/autoepatch.sh
Gentoo

Diff of /trunk/autoepatch.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 39 Revision 40
44 ( 44 (
45 source "${patchset}/${patchset##*/}.sh" 45 source "${patchset}/${patchset##*/}.sh"
46 targets="$(patch_targets)" 46 targets="$(patch_targets)"
47 [[ -z ${targets} ]] && exit 0 47 [[ -z ${targets} ]] && exit 0
48 48
49 einfo "Testing ${patchset##*/} ..." 49 einfo "Applying ${patchset##*/} ..."
50 50
51 while read target; do 51 while read target; do
52 einfo " on ${target##$(pwd)/} ..." 52 ebegin " on ${target##$(pwd)/} ..."
53 53
54 for patch in "${patchset}"/*.patch; do 54 for patch in "${patchset}"/*.patch; do
55 if try_patch "${target}" "${patch}"; then 55 if try_patch "${target}" "${patch}"; then
56 PATCH_APPLIED="yes" 56 PATCH_APPLIED="yes"
57 break 57 break
58 fi 58 fi
59 done 59 done
60 60
61 if type patch_trigger_action &>/dev/null; then 61 if type patch_trigger_action &>/dev/null; then
62 patch_trigger_action "${target}" 62 if patch_trigger_action "${target}"; then
63 PATCH_APPLIED="yes"
64 fi
63 fi 65 fi
64 66
65 # Check if the patchset requires us to fail if the 67 # Check if the patchset requires us to fail if the
66 # patch is not applied. By default, don't. 68 # patch is not applied. By default, don't.
67 if ! type patch_required &>/dev/null; then 69 if ! type patch_required &>/dev/null; then
72 patch_failed_msg() { 74 patch_failed_msg() {
73 eerror "Failed patch ${patchset##*/}" 75 eerror "Failed patch ${patchset##*/}"
74 } 76 }
75 fi 77 fi
76 78
77 if [[ -z ${PATCH_APPLIED} ]]; then 79 if [[ -n ${PATCH_APPLIED} ]]; then
80 eend 0
81 else
82 eend 1
78 if patch_required; then 83 if patch_required; then
79 patch_failed_msg && exit 2 84 patch_failed_msg && exit 2
80 else 85 else
81 ewarn " failed, but patch not required, ignoring." 86 ewarn " failed, but patch not required, ignoring."
82 fi 87 fi

Legend:
Removed from v.39  
changed lines
  Added in v.40

  ViewVC Help
Powered by ViewVC 1.1.20