Fix `gradlew` execution for non-standard systems
On older Solaris versions and other systems where `/bin/sh` is not
a POSIX-compliant shell, the shell syntax used by the wrapper
script fails on certain constructs.
Fix those cases where the wrapper script was doing some things not
supported on the older non-POSIX shells: using backticks instead
of `$()`, changing the syntax of the `case` statement, and using
`expr` instead of arithmetic expansion.
08 Sep 17 3edfbe0d0f1a6682b667e95157e3220797ce24fd