bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: updating copyright years


From: Eric Blake
Subject: Re: updating copyright years
Date: Wed, 5 Aug 2009 14:29:49 +0000 (UTC)

> +if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null;
> then
> +  compare() { diff -u "$@"; }

'diff -u' is required by POSIX 2008.  Rather than filtering on
whether 'diff --version' includes GNU, it would be better to
filter on whether 'diff -u' is accepted on the command line,
to allow other POSIX-compliant implementations their chance.
Something like 'diff -u /dev/null /dev/null' giving no output
and having a 0 status should be a sufficient filter.

-- 
Eric Blake




reply via email to

[Prev in Thread] Current Thread [Next in Thread]