On Tue, Feb 18, 2020 at 01:55:19PM +1300, Mike Taves wrote: > On Tue, 18 Feb 2020 at 13:20, Greg Troxel <g...@lexort.com> wrote: > > "GEOS" <geos-t...@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).
GNU coreutils "printf" works fine here: [strk@liz:~] /usr/bin/printf "%q\n" "space 'quote' and \"doublequote\"" 'space '\''quote'\'' and "doublequote"' [strk@liz:~] /usr/bin/printf --version | head -1 printf (GNU coreutils) 8.28 --strk; _______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel