[PROJ] new bashism (in 6.3.1?)

Greg Troxel gdt at lexort.com
Tue Mar 10 09:31:53 PDT 2020


Even Rouault <even.rouault at spatialys.com> writes:

> On mardi 10 mars 2020 16:20:21 CET Sebastiaan Couwenberg wrote:
>> On 3/10/20 4:12 PM, Even Rouault wrote:
>> > I've no idea myself when I use a bashism or not :-)
>> 
>> checkbashisms and shellcheck are your friend.
>> 
>> https://manpages.debian.org/unstable/devscripts/checkbashisms.1.en.html
>> https://manpages.debian.org/unstable/shellcheck/shellcheck.1.en.html
>
> Thanks, that's helpful
>
> I've issued https://github.com/OSGeo/PROJ/pull/2044 to remove the [[ ]] 
> bashism.

I have a local patch, which does result in it running ok.  Thanks for
beating me to the PR.

I have just committed an update to pkgsrc, moving it to 6.3.1 from
5.2.0.  I think not too much will break; we'll see.   On to 7.0.0 in my
staging area!

patch was merely:

--- data/Makefile.in.orig       2020-02-10 10:16:34.000000000 +0000
+++ data/Makefile.in
@@ -594,7 +594,7 @@ proj.db: $(DATAPATH)/sql/*.sql
        echo "" | head -c1; \
         if [ $$? -eq 0 ] ; then \
          echo "Running foreign_key_check"; \
-        if [[ $$(echo "pragma foreign_key_check;" | sqlite3 proj.db | head -c1 | wc -c) -ne 0 ]]; then \
+        if [ $$(echo "pragma foreign_key_check;" | sqlite3 proj.db | head -c1 | wc -c) -ne 0 ]; then \
                echo "Foreign key check failed"; \
                $(RM) proj.db; \
                exit 1; \
g


More information about the PROJ mailing list