Startup-script for portable GeoGebra on Linux depends on expr-semantics

Alexander Klein shared this problem 5 years ago

The GeoGebra-port for FreeBSD is based on GeoGebra portable for Linux, and throws a lot of syntax errors in the startup-script geogebra/geogebra.

While this has been fixed downstream by replacing the whole script for this one use-case, it turns out that the errors are caused by the method used for option-parsing towards the end of the file, which makes heavy use of expr to do the pattern-matching.

Since the script explicitly uses bash, I think the whole matching-cascade could be greatly simplified by just using the built-in [[ instead of expr, with the additional benefit that no clunky quoting is necessary any more, as in the following example:

  1. $ if [[ xyzabc == *abc ]]; then echo Match\!; fi
  2. Match!

Best regards,


© 2021 International GeoGebra Institute