On Fri, Sep 26, 2008 at 12:20 AM, Miklos Vajna [off-list ref] wrote:
On Tue, Sep 23, 2008 at 11:43:23PM +0100, Jonathan del Strother [off-list ref] wrote:
quoted
Shell scripting isn't my fortĂŠ, suggestions for improvements would be
welcome.
+elif test -x /usr/bin/pmset && (! /usr/bin/pmset -g batt | grep -q 'Battery Power' )
What about
+elif test -x /usr/bin/pmset && /usr/bin/pmset -g batt | grep -q 'AC Power'
?
I was trying to handle pmset reporting anything other than Battery
Power (currently it reports either Battery, UPS, or AC), but thinking
about it, if you're on UPS, you probably don't want git gc eating into
your remaining power...
I'll post an updated version on Monday.