diff --git a/ezsync b/ezsync index c3a98b5..5a22d23 100755 --- a/ezsync +++ b/ezsync @@ -182,10 +182,34 @@ for OVERLAY in ${MERGED_PORTAGE[*]}; do fi done +# Execute all 'precommit' enabled modules +for MODULE in ${MODULES_PRECOMMIT}; do + loadModule ${MODULE} "precommit" + RESULT=${?} + if [ ${RESULT} -eq 255 ]; then + printWarn "Trying to load module: ${MODULE}, that is incompatible with event: precommit!" + elif [ ${RESULT} -ne 0 ]; then + fail "EzBuild was unable to execute module: ${MODULE}!" + fi + unloadModule +done + # Regenerate Portage cache printInfo "Updating constructed Portage cache..." run "FEATURES="metadata-transfer" PORTDIR="${PORTAGESDIR}/${PORTAGE_BUILD[0]}" egencache --update --portdir=${PORTAGESDIR}/${PORTAGE_BUILD[0]} --jobs=${MAXJOBS} --load-average=${LOADAVERAGE} --tolerant" [ ${?} -ne 0 ] && die "EzBuild was unable to regenerate cache!" +# Execute all 'postcommit' enabled modules +for MODULE in ${MODULES_POSTCOMMIT}; do + loadModule ${MODULE} "postcommit" + RESULT=${?} + if [ ${RESULT} -eq 255 ]; then + printWarn "Trying to load module: ${MODULE}, that is incompatible with event: postcommit!" + elif [ ${RESULT} -ne 0 ]; then + fail "EzBuild was unable to execute module: ${MODULE}!" + fi + unloadModule +done + # Finally quit the application quit