From 9144182d9c8f0cf16973d8ec91eafc624310c6ca Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Wed, 21 Sep 2011 15:50:28 -0700 Subject: add install hooks --- bin/misc-functions.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bin/misc-functions.sh') diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 30244a74b..7d858a28a 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -985,6 +985,21 @@ success_hooks() { done } +install_hooks() { + local hooks_dir="${PORTAGE_CONFIG_ROOT}/etc/portage/hooks/install" + local fp + local ret=0 + shopt -s nullglob + for fp in "${hooks_dir}"/*; do + if [ -x "$fp" ]; then + "$fp" + ret=$(( $ret | $? )) + fi + done + shopt +s nullglob + return $ret +} + if [ -n "${MISC_FUNCTIONS_ARGS}" ]; then source_all_bashrcs [ "$PORTAGE_DEBUG" == "1" ] && set -x -- cgit v1.2.3-1-g7c22