[geos-devel] [GEOS] #1015: Update geos-config tool for consistency

Mike Taves mwtoews at gmail.com
Mon Feb 17 16:55:19 PST 2020


On Tue, 18 Feb 2020 at 13:20, Greg Troxel <gdt at lexort.com> wrote:
> "GEOS" <geos-trac at osgeo.org> writes:
> >  **Specify bash, and use printf to escape paths (if needed)**
> >
> >  This allows installation with CMake to other directories, such as `/opt/my
> >  prefix`, since `geos-config --prefix` would return `/opt/my\ prefix`. Also
> >  `printf` is a bash-only feature.
>
> It really seems like a regresssion to require bash, rather than POSIX
> shell, and it's definitely a regression if the build doesn't find bash
> and substitute in the path.
>
> Is this really necessary?

As noted above, the printf function is built-in with Bash, and can
properly escape a path. While I see there is also /usr/bin/printf I'm
not sure how common or standard this tool is (my tests with /bin/sh
didn't go well, so I opted to switch to Bash for reliability).
Currently, other Bash scripts are present in tools/ci/ but these are
not installed with GEOS.

Besides Native Windows, what OSes (that GEOS is used on) does not have
Bash available? As far as I know, it's available on most Linux
distributions, all recent Solaris and macOS, and even some Windows. I
can't think of any other shell that is more common.


More information about the geos-devel mailing list