ehooks() { local x local -a debian_patches if [[ -r ${S}/debian/patches/series ]]; then [[ -r "${EHOOKS_FILESDIR}"/series ]] \ && ( cp "${EHOOKS_FILESDIR}"/series "${S}/debian/patches/series" || die ) for x in $(grep -v \# "${S}/debian/patches/series"); do debian_patches+=( "${S}/debian/patches/${x}" ) done [[ -n ${debian_patches[@]} ]] \ && echo "${color_bold}>>> Processing Debian archive file patchset${color_norm} ..." \ && eapply "${debian_patches[@]}" \ && echo "${color_bold}>>> Done.${color_norm}" fi for x in "${EHOOKS_FILESDIR}"/*.{diff,patch}; do [[ -r ${x} ]] && eapply "${x}" done }