[pass] [PATCH] platform: find getopt in alternate osx locations

Allan Odgaard lists+pass at simplit.com
Tue Sep 30 15:54:02 CEST 2014


On 30 Sep 2014, at 15:35, Jamie Couture wrote:

> Ah yes.  I also noticed I wasn't completely silencing 'which' as
> well; how about this fixup instead:
>
> -GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || which port 
> 2>/dev/null && echo /opt/local || echo /usr/local)/bin/getopt"
> +GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || { which port 
> >/dev/null 2>&1 && echo /opt/local; } || echo /usr/local)/bin/getopt"
> SHRED="srm -f -z"

Looks good to me, though I personally prefer the &>/dev/null shorthand 
for redirecting both stdout and stderr.


More information about the Password-Store mailing list