Add hook support for a post_build_hook routine that is executed right after packages have been built by the pkg_comp build subcommand.
This enables me to, for example, define a post_build_hook function in /usr/local/etc/pkg_comp/default.conf to preserve the pbulk log outside of the sandbox after the build finishes but before the sandbox gets destroyed:
post_build_hook() {
local logdir bulklog sandbox_bulklog
logdir=/var/pkg_comp/log
bulklog=$logdir/bulklog
sandbox_bulklog=/var/pkg_comp/sandbox/pkg_comp/work/bulklog
[ ! -e "$sandbox_bulklog" ] && return
if [ -e "$bulklog" ]; then
rm -rf "$bulklog.old"
mv "$bulklog" "$bulklog.old"
fi
mkdir -p "$logdir"
cp -rp "$sandbox_bulklog" "$bulklog"
}
Add hook support for a
post_build_hook
routine that is executed right after packages have been built by the pkg_compbuild
subcommand.This enables me to, for example, define a
post_build_hook
function in/usr/local/etc/pkg_comp/default.conf
to preserve the pbulk log outside of the sandbox after the build finishes but before the sandbox gets destroyed: