git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add OS X support to the pre-auto-gc example hook

From
Jonathan del Strother <maillist@steelskies.com>
Date
Sep 27, 2008, 09:53 UTC
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 <vmiklos@frugalware.org> wrote:
Show 11 quoted lines
> On Tue, Sep 23, 2008 at 11:43:23PM +0100, Jonathan del Strother <jon.delStrother@bestbefore.tv> 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.

Previous: Miklos VajnaNext: Jonathan del Strother
Message 3 of 5 in “Add OS X support to the pre-auto-gc example hook”
  1. Add OS X support to the pre-auto-gc example hookJonathan del Strother, Sep 23, 2008
  2. Miklos VajnaSep 25, 2008
  3. Jonathan del StrotherSep 27, 2008
  4. Add OS X support to the pre-auto-gc example hookJonathan del Strother, Sep 29, 2008
  5. Miklos VajnaSep 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.