Add more events: precommit & postcommit

Este commit está contenido en:
belliash 2012-01-16 13:22:04 +01:00
padre 2202509d87
commit 814b9a406b
Se han modificado 1 ficheros con 24 adiciones y 0 borrados

24
ezsync
Ver fichero

@ -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