1 |
On 07/14/2014 07:46 PM, Neil Bothwick wrote: |
2 |
> On Mon, 14 Jul 2014 18:52:57 +0800, Andrew Lowe wrote: |
3 |
> |
4 |
>> I have a laptop churning away in the loungeroom doing an |
5 |
>> "emerge -NuD world" whilst I'm in my office, amongst other things |
6 |
>> composing this email. If my world update fails, I won't know until I |
7 |
>> look at the screen in the other room. Is there a way to get emerge to |
8 |
>> play a song depending upon the status of the emerge build? |
9 |
> |
10 |
> Using portage hooks, either globally in /etc/portage/bashrc or per |
11 |
> package in /etc/portage/package.env. I have this in bashrc to warn me of |
12 |
> failures |
13 |
> |
14 |
> register_die_hook ebuild_failed |
15 |
> ebuild_failed { |
16 |
> do something foreboding |
17 |
> } |
18 |
> |
19 |
> I actually have it send an alert to my phone with Posterous but you can |
20 |
> do whatever you want. |
21 |
> |
22 |
> I also use package.env to alert me when particularly |
23 |
> time-consuming ebuilds, like LibreOffice and Chromium, have completed |
24 |
> successfully. |
25 |
> |
26 |
> |
27 |
|
28 |
Neil, |
29 |
This sounds interesting. Care to share one of these hooks to show what |
30 |
they actually look like? |
31 |
|
32 |
Regards, |
33 |
Andrew |