From: Jonathan del Strother Date: Sat, 27 Sep 2008 09:53:31 GMT Subject: Re: [PATCH] Add OS X support to the pre-auto-gc example hook Message-ID: <57518fd10809270253s4c07318bjd54c7d86460ce7d7@mail.gmail.com> In-Reply-To: <20080925232008.GO23137@genesis.frugalware.org> On Fri, Sep 26, 2008 at 12:20 AM, Miklos Vajna wrote: > On Tue, Sep 23, 2008 at 11:43:23PM +0100, Jonathan del Strother wrote: >> 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.