/[autoepatch]/trunk/lib/functions.sh
Gentoo

Diff of /trunk/lib/functions.sh

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

Revision 18 Revision 19
96 96
97 local patchname="$(basename "$(dirname "${patch}")")-${patch##*/}" 97 local patchname="$(basename "$(dirname "${patch}")")-${patch##*/}"
98 if [[ -d "${target}" ]]; then 98 if [[ -d "${target}" ]]; then
99 pushd "${target}" &>/dev/null 99 pushd "${target}" &>/dev/null
100 100
101 gpatch -g0 -p0 --dry-run <"${patch}" &> "${T}/autepatch.$$.${patchname}.log" || \ 101 gpatch -g0 -p0 --dry-run <"${patch}" &> "${T}/autoepatch.$$.${patchname}.log" || \
102 return 1 102 return 1
103 103
104 ebegin " Applying ${patchname} ..." 104 ebegin " Applying ${patchname} ..."
105 patch -g0 -p0 --no-backup-if-mismatch "${patch}" &> "${T}/autepatch.$$.${patchname}.log" 105 patch -g0 -p0 --no-backup-if-mismatch "${patch}" &> "${T}/autoepatch.$$.${patchname}.log"
106 ret=$? 106 ret=$?
107 eend ${ret} 107 eend ${ret}
108 108
109 popd &>/dev/null 109 popd &>/dev/null
110 return ${ret} 110 return ${ret}
111 else 111 else
112 gpatch -g0 --dry-run "${target}" "${patch}" &> "${T}/autepatch.$$.${patchname}.log" || \ 112 gpatch -g0 --dry-run "${target}" "${patch}" &> "${T}/autoepatch.$$.${patchname}.log" || \
113 return 1 113 return 1
114 114
115 ebegin " Applying ${patchname} ..." 115 ebegin " Applying ${patchname} ..."
116 patch -g0 --no-backup-if-mismatch "${target}" "${patch}" &> "${T}/autepatch.$$.${patchname}.log" 116 patch -g0 --no-backup-if-mismatch "${target}" "${patch}" &> "${T}/autoepatch.$$.${patchname}.log"
117 ret=$? 117 ret=$?
118 eend ${ret} 118 eend ${ret}
119 119
120 popd &>/dev/null 120 popd &>/dev/null
121 return ${ret} 121 return ${ret}

Legend:
Removed from v.18  
changed lines
  Added in v.19

  ViewVC Help
Powered by ViewVC 1.1.20