RFR: 7902970: Script build.sh will fail if the default shell is dash
Guoxiong Li
gli at openjdk.java.net
Sat Jun 12 15:10:10 UTC 2021
Hi all,
My local default shell is `dash`.
$ ls -al /bin/*sh*
-rwxr-xr-x 1 root root 1113504 Jun 7 2019 /bin/bash
-rwxr-xr-x 1 root root 121432 Jan 25 2018 /bin/dash
lrwxrwxrwx 1 root root 4 Sep 26 2020 /bin/rbash -> bash
lrwxrwxrwx 1 root root 4 Sep 26 2020 /bin/sh -> dash
lrwxrwxrwx 1 root root 4 Sep 26 2020 /bin/sh.distrib -> dash
lrwxrwxrwx 1 root root 7 Sep 18 2020 /bin/static-sh -> busybox
When I use the command `sh make/build.sh --help`, the build.sh will fail.
Because the `dash` doesn't support the variables such as `BASH_SOURCE`.
The successful command is `bash make/build.sh --help`, which uses `bash` explicitly
instead of the default shell `sh` implicitly.
This patch clarifies this situation in the README.
Thanks for taking the time to review.
Best Regards,
-- Guoxiong
-------------
Commit messages:
- Fix README. Add the description about failing to build with the default shell
Changes: https://git.openjdk.java.net/jtreg/pull/12/files
Webrev: https://webrevs.openjdk.java.net/?repo=jtreg&pr=12&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-7902970
Stats: 7 lines in 1 file changed: 7 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jtreg/pull/12.diff
Fetch: git fetch https://git.openjdk.java.net/jtreg pull/12/head:pull/12
PR: https://git.openjdk.java.net/jtreg/pull/12
More information about the jtreg-dev
mailing list