Handle macOS installations with non-Apple Java setups #1415 (#1422)
Handle macOS installations with non-Apple Java setups #1415 (#1422)

* Handle macOS installations with non-Apple Java setups #1415

* Correctly check return code and use greadlink #1422

* `readlink -f` does not exist on macOS,
so instead use `greadlink` which can be obtained from brew coreutils.

karianna/openjdk-build,AdoptOpenJDK/openjdk-build,karianna/openjdk-build,AdoptOpenJDK/openjdk-build