If DISABLE_JLINK set, don't try to chmod jre/bin/java (#4651)

* If DISABLE_JLINK set, don't try to chmod jre/bin/java

* Do it for oracle server as well
This commit is contained in:
Chris Stewart 2022-08-23 13:16:42 -05:00 committed by GitHub
parent 9afab28d50
commit 2001e86ab9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 29 deletions

View file

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
if [[ -z "$DISABLE_JLINK" ]]; then
if test -f "jre/bin/java"; then if test -f "jre/bin/java"; then
if [[ "$OS" == "OSX" ]]; then if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable #mac doesn't allow random binaries to be executable
@ -9,6 +10,7 @@ if test -f "jre/bin/java"; then
chmod +x jre/bin/java #make sure java is executable chmod +x jre/bin/java #make sure java is executable
fi fi
if test -f "../jre/bin/java" ; then if test -f "../jre/bin/java" ; then
if [[ "$OS" == "OSX" ]]; then if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable #mac doesn't allow random binaries to be executable
@ -17,6 +19,7 @@ if test -f "../jre/bin/java" ; then
fi fi
chmod +x ../jre/bin/java #make sure java is executable chmod +x ../jre/bin/java #make sure java is executable
fi fi
fi
get_java_no_jlink() { get_java_no_jlink() {
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then

View file

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
if [[ -z "$DISABLE_JLINK" ]]; then
if test -f "jre/bin/java"; then if test -f "jre/bin/java"; then
if [[ "$OS" == "OSX" ]]; then if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable #mac doesn't allow random binaries to be executable
@ -17,11 +19,10 @@ if test -f "../jre/bin/java" ; then
fi fi
chmod +x ../jre/bin/java #make sure java is executable chmod +x ../jre/bin/java #make sure java is executable
fi fi
fi
chip=$(uname -m) chip=$(uname -m)
get_java_no_jlink() { get_java_no_jlink() {
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
echo "$JAVA_HOME/bin/java" echo "$JAVA_HOME/bin/java"