On Mon, 14 Jul 2014 20:09:40 +0800, Andrew Lowe wrote:

> > register_die_hook ebuild_failed
> > ebuild_failed {
> >     do something foreboding
> > }
> > 
> > I actually have it send an alert to my phone with Posterous but you
> > can do whatever you want.
> > 
> > I also use package.env to alert me when particularly
> > time-consuming ebuilds, like LibreOffice and Chromium, have completed
> > successfully.
> > 
> >   
> 
> Neil,
>       This sounds interesting. Care to share one of these hooks to
> show what they actually look like?

The path to Posterous my messages take is rather convoluted, but whatever
you put in the ebuild_failed function will be executed on failure. For
the success notifications, I put this in bashrc

if [[ "${EBUILD_SUCCESS}" == "true" ]]; then
        register_success_hook ebuild_success

        ebuild_success() {
                do something warm and fuzzy
        }
fi

/etc/portage.env/notify.conf contains
EBUILD_SUCCESS="true"

and /etc/portage/package.env/libreoffice contains
app-office/libreoffice notify.conf


-- 
Neil Bothwick

"I can picture in my mind a world without war, a world without hate. And I
can picture us attacking that world, because they'd never expect it."

Attachment: signature.asc
Description: PGP signature

Reply via email to