On 01/11/2022 08:12, Simon Josefsson via Gnulib discussion list wrote:
Bruno Haible <br...@clisp.org> writes:
Hi Simon,
+ @if ! indent --version 2> /dev/null | grep -q 'GNU indent'; then\
As mentioned in the Autoconf manual [1], the grep option '-q' is not portable.
E.g. on Solaris 10:
$ echo | grep -q x
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
The portable alternative is
grep 'GNU indent' > /dev/null
Thank you! I installed these two fixes, which caught the unportable
usages in scripts for some packages.
> +sc_unportable_grep_q:
> + @prohibit='grep -q' halt="unportable 'grep -q', use >/dev/null instead" \
> + $(_sc_search_regexp)
> +
Note the above isn't equivalent as -q will exit early upon first match
(as defined by POSIX)
Note I confirmed that Solaris 11 does support -q, while Solaris 10 does not.
I see Solaris 10 falls out of vendor support end of 2023.
cheers,
Pádraig