aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <zlin@exherbo.org> 2008-06-22 00:20:56 +0200
committerAvatar Bo ├śrsted Andresen <zlin@exherbo.org> 2008-06-22 12:59:06 +0200
commit21a249d3486b31eb0dae37f87e9028ae6aead55e (patch)
tree655dbb5b7d482dfa6e059e3a5f578a7a774a7cf0 /paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
parent568b7fed55079220d7400f7ec65775a7cd5fa04c (diff)
downloadpaludis-21a249d3486b31eb0dae37f87e9028ae6aead55e.tar.gz
paludis-21a249d3486b31eb0dae37f87e9028ae6aead55e.tar.xz
Make default() usable in exlibs and other functions whose name don't match $EBUILD_PHASE.
Diffstat (limited to 'paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash')
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash5
1 files changed, 3 insertions, 2 deletions
diff --git a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
index 7fd495d..c5fe63f 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -81,6 +81,7 @@ require()
default()
{
- [[ $(type -t "default_${FUNCNAME[1]}" ) == "function" ]] || die "default_${FUNCNAME[1]} not a function"
- default_${FUNCNAME[1]} "$@"
+ [[ $(type -t "default_$(paludis_phase_to_function_name "${EBUILD_PHASE}")" ) == "function" ]] || \
+ die "default_$(paludis_phase_to_function_name "${EBUILD_PHASE}") is not a function"
+ default_$(paludis_phase_to_function_name "${EBUILD_PHASE}") "$@"
}