Problem with mutt version.sh script

Gero Treuner gero-mutt at innocircle.com
Mon Apr 16 13:41:12 UTC 2018


Hi,

On Mon, Apr 16, 2018 at 07:53:56AM -0500, Paul Keusemann wrote:
> I have just built mutt-1.9.5 on several platforms and ran into a problem
> with the version.sh script on systems where /bin/sh is not bash.
> 
> This:
> 
> { [ -e ".git" ] && command -v git >/dev/null 2>&1; } \
> || exec cat VERSION
> 
> does not work when run in a bourne shell.  The -e option is not supported in
> the version of test built in to the bourne shell. It does work when run in
> bash or a Korn shell.
> 
> This:
> 
> { /bin/test -e ".git" && command -v git >/dev/null 2>&1; } \
> || exec cat VERSION
> 
> does work in a bourne shell.

I'd prefer using an option which is supported by Bourne shell. What
about "-d"?

That should be possible according to the description (with very few test
options) here:
https://en.wikibooks.org/wiki/Bourne_Shell_Scripting/Appendix_C:_Quick_Reference


Gero


More information about the Mutt-dev mailing list