Mike Taves <mwto...@gmail.com> writes: > On Wed, 19 Feb 2020 at 03:11, Greg Troxel <g...@lexort.com> wrote: >> 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!
Thank you for listening (seriously). We are, amusingly enough, moving to a point where there is an assumption of all linux, much like the old days when it was assumed all was windows. >> > 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 Thanks - I don't think that's nearly as big a deal, but in my experience dealing with packaging I have found that many uses of bash were not actually necessary or very easy to avoid. One common issue is using == in test, when POSIX specifies (and Bourne shells always were) just =. >> 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 Great, thanks. > 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. I didn't realize autoconf flat-out objected to spaces, but it is not surprising since in the old-school command line tradition spaces is files are somewhere between bizarre and unthinkable. Sounds good to just escape spaces for cmake. _______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel