Browse Source

add 2 event: presync & postsync

master
belliash 8 years ago
parent
commit
965777f0df
1 changed files with 24 additions and 0 deletions
  1. +24
    -0
      ezsync

+ 24
- 0
ezsync View File

@@ -96,6 +96,18 @@ printInfo "Loading public keys..."
eval `keychain --noask --eval id_dsa id_rsa &> /dev/null`
[ ${?} -ne 0 ] && die "EzBuild was unable to load public keys!" 1

# Execute all 'presync' enabled modules
for MODULE in ${MODULES_PRESYNC}; do
loadModule ${MODULE} "presync"
RESULT=${?}
if [ ${RESULT} -eq 255 ]; then
printWarn "Trying to load module: ${MODULE}, that is incompatible with event: presync!"
elif [ ${RESULT} -ne 0 ]; then
fail "EzBuild was unable to execute module: ${MODULE}!"
fi
unloadModule
done

# Update local copy of Portage that is being built
printInfo "Refreshing constructed Portage tree..."
pullRepository ${PORTAGESDIR}/${PORTAGE_BUILD[0]} ${PORTAGE_BUILD[1]} ${PORTAGE_BUILD[2]} ${PORTAGE_BUILD[3]}
@@ -128,6 +140,18 @@ for OVERLAY in ${SYNC_OVERLAYS[*]}; do
fi
done

# Execute all 'postsync' enabled modules
for MODULE in ${MODULES_POSTSYNC}; do
loadModule ${MODULE} "postsync"
RESULT=${?}
if [ ${RESULT} -eq 255 ]; then
printWarn "Trying to load module: ${MODULE}, that is incompatible with event: postsync!"
elif [ ${RESULT} -ne 0 ]; then
fail "EzBuild was unable to execute module: ${MODULE}!"
fi
unloadModule
done

# Optionally merge data into build overlay
if isSet MERGED_OVERLAY && isSet OVERLAY_BUILD; then
printInfo "Merging ebuilds into constructed Overlay..."


Loading…
Cancel
Save