# Remove CVS directories recursiveley. Useful when a source tarball contains
# internal CVS directories. Defaults to $PWD.
ecvs_clean() {
- [[ -z $* ]] && set -- .
+ [[ $# -eq 0 ]] && set -- .
find "$@" -type d -name 'CVS' -prune -print0 | xargs -0 rm -rf
find "$@" -type f -name '.cvs*' -print0 | xargs -0 rm -rf
}
# Remove .svn directories recursiveley. Useful when a source tarball contains
# internal Subversion directories. Defaults to $PWD.
esvn_clean() {
- [[ -z $* ]] && set -- .
+ [[ $# -eq 0 ]] && set -- .
find "$@" -type d -name '.svn' -prune -print0 | xargs -0 rm -rf
}
+# @FUNCTION: egit_clean
+# @USAGE: [list of dirs]
+# @DESCRIPTION:
+# Remove .git* directories/files recursiveley. Useful when a source tarball
+# contains internal Git directories. Defaults to $PWD.
+egit_clean() {
+ [[ $# -eq 0 ]] && set -- .
+ find "$@" -type d -name '.git*' -prune -print0 | xargs -0 rm -rf
+}
+
# @FUNCTION: estack_push
# @USAGE: <stack> [items to push]
# @DESCRIPTION:
: $(( count++ ))
done
+ (( EPATCH_N_APPLIED_PATCHES++ ))
+
# if we had to decompress the patch, delete the temp one
if [[ -n ${PIPE_CMD} ]] ; then
rm -f "${PATCH_TARGET}"
# a full path to an icon
# type: what kind of application is this?
# for categories:
-# http://standards.freedesktop.org/menu-spec/latest/apa.html
+# https://specifications.freedesktop.org/menu-spec/latest/apa.html
# if unset, function tries to guess from package's category
# fields: extra fields to append to the desktop file; a printf string
# @CODE
# don't clobber any EPATCH vars that the parent might want
local EPATCH_SOURCE check
- for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT}}; do
+ for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT%/*}}; do
EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CTARGET}/${check}
[[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CHOST}/${check}
[[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${check}
if [[ -d ${EPATCH_SOURCE} ]] ; then
+ local old_n_applied_patches=${EPATCH_N_APPLIED_PATCHES:-0}
EPATCH_SOURCE=${EPATCH_SOURCE} \
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_MULTI_MSG="Applying user patches from ${EPATCH_SOURCE} ..." \
epatch
echo "${EPATCH_SOURCE}" > "${applied}"
- has epatch_user_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" epatch_user_death_notice"
+ if [[ ${old_n_applied_patches} -lt ${EPATCH_N_APPLIED_PATCHES} ]]; then
+ has epatch_user_death_notice ${EBUILD_DEATH_HOOKS} || \
+ EBUILD_DEATH_HOOKS+=" epatch_user_death_notice"
+ fi
return 0
fi
done