On Wed, 19 Feb 2020 at 03:11, Greg Troxel <g...@lexort.com> wrote:
> First, to me requiring bash is worse than telling people not to do
> ridiculous things like putting spaces in pathnames :-)  But I realize
> other people think spaces in pathnames is an ok thing.
>
> The right question about tools is not what's typically on Linux but what
> POSIX requires.
>
> In searching for the POSIX printf spec, I found this post about escaping
> spaces in a portable manner.
>
>   
> https://stackoverflow.com/questions/12162010/posix-sh-equivalent-for-bash-s-printf-q
>
> The specs at opengroup.org seem hard to deal with today - not sure if
> they changed - but I found this POSIX printf description:
>
>   https://www.unix.com/man-page/POSIX/1posix/printf/

Thanks for the resources!

> > Currently, other Bash scripts are present in tools/ci/ but these are
> > not installed with GEOS.
>
> ci tools are quite a different story than a requirement for regular
> installs, although I see using bash there (vs /bin/sh) as a bug also.

I'll consider going over these to see if they can be POSIX /bin/sh

> > Besides Native Windows, what OSes (that GEOS is used on) does not have
> > Bash available?
>
> None of the BSDs have bash by default.  When it is present, via ports,
> pkgsrc, etc., it's not in /bin.  On NetBSD, it's in /usr/pkg/bin/bash.
> People use it for their login shell.  I do too - I'm not a bash hater,
> but object to it for programming use.  It's enormous, and is one
> particular implementation among many.  I view it as personal choice to
> use it for interactive use, and not appropriate for scripting.
>
> The fact that /bin/bash does not exist on *BSD, and probably other
> places, prompted my question about looking for it and substituting the
> path.  Expecting bash to be in /bin/bash is just not a valid assumption.
>
> So, given that there seems to be a way to do this without introducing a
> dependenchy on bash, I'd like to see this backed out.

Aha, so there are some that will be alienated, which I agree is a bad
situation, so I'll submit a PR to restore back to #!/bin/sh

I'll remove printf %q altogether and simply insert an escaped path to
the script. I'll probably only do this with CMake, since that's the
only install solution that supports spaces.
_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to