build/bin/buildrc

22 lines
623 B
Plaintext
Raw Normal View History

# Emerge wrapper, uses matter lock file support to avoid
# concurrent execution
emerge() {
matter_lock_file="/var/tmp/.matter_resource.lock"
flock -x -n "${matter_lock_file}" true
rc=${?}
if [ "${rc}" != "0" ]; then
echo
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "matter is running on this chroot, in order to prevent explosions"
echo "this emerge instance will terminate NOW"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo
return 1
else
2012-01-14 13:17:42 +01:00
# eval $(portageq envvar -v FETCHCOMMAND RESUMECOMMAND PORTAGE_RSYNC_OPTS)
# add bandwidth limit here
/usr/bin/emerge --quiet-build=n "$@"
return ${?}
fi
}