On Thu, 29 Sep 2022 04:03:39 GMT, Mike Duigou <mdui...@openjdk.org> wrote:
>> configure line 29: >> >>> 27: >>> 28: # Get an absolute path to this script, since that determines the >>> top-level directory. >>> 29: source_path="${BASH_SOURCE[0]:-$0}" >> >> Can we (do we want to) rely the shell running this script itself supporting >> BASH_SOURCE and/or other potential bash-isms? > > It is explicitly a bash script so I believe it is OK to use bash-isms. I > usually write pure POSIX scripts because of the issues with MacOS > compatibility (they use a very old GPLv2 version of BASH) and compatibility > with other shells but didn't feel it was an issue here. This script is just a very thin wrapper of the script in `make/autoconf/configure`. That script is explicitly called with `bash` so using bash-isms there (and in the rest of the configure script and build system) is fine. In this wrapper however, I think it's better to stick with compatible shell as much as possible. The shebang in this file isn't really relevant as we can't make files executable. I suspect plenty of users are still running this as `sh configure` out of habit. I would recommend moving the space check to `make/autoconf/configure` instead. ------------- PR: https://git.openjdk.org/jdk/pull/10477