[PROJ] new bashism (in 6.3.1?)

Greg Troxel gdt at lexort.com
Tue Mar 10 08:00:27 PDT 2020


In data/Makefile.am there is:

         if [[ $$(echo "pragma foreign_key_check;" | sqlite3 proj.db | head -c1 | wc -c) -ne 0 ]]; then \

which does not conform to POSIX sh.  Probably it should just be `` or
$(), and [[ I think is just an unnecessary bashism.

I wonder if the CI infrastructure could somehow avoid exposing
non-standard extensions and catch these things.   I don't know if bash
has an environment variable to strictly conform to POSIX, but that would
be a good atonement for the sins of extensions that lead to nonportable
code :-)


More information about the PROJ mailing list