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,21 +1,24 @@
#!/bin/bash
if test -f "jre/bin/java"; then
if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable
#remove the quarantine attribute so java is executable on mac
xattr -d com.apple.quarantine jre/bin/java
if [[ -z "$DISABLE_JLINK" ]]; then
if test -f "jre/bin/java"; then
if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable
#remove the quarantine attribute so java is executable on mac
xattr -d com.apple.quarantine jre/bin/java
fi
chmod +x jre/bin/java #make sure java is executable
fi
chmod +x jre/bin/java #make sure java is executable
fi
if test -f "../jre/bin/java" ; then
if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable
#remove the quarantine attribute so java is executable on mac
xattr -d com.apple.quarantine ../jre/bin/java
if test -f "../jre/bin/java" ; then
if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable
#remove the quarantine attribute so java is executable on mac
xattr -d com.apple.quarantine ../jre/bin/java
fi
chmod +x ../jre/bin/java #make sure java is executable
fi
chmod +x ../jre/bin/java #make sure java is executable
fi
get_java_no_jlink() {

View file

@ -1,27 +1,28 @@
#!/bin/bash
if test -f "jre/bin/java"; then
if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable
#remove the quarantine attribute so java is executable on mac
xattr -d com.apple.quarantine jre/bin/java
fi
chmod +x jre/bin/java #make sure java is executable
fi
if test -f "../jre/bin/java" ; then
if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable
#remove the quarantine attribute so java is executable on mac
xattr -d com.apple.quarantine ../jre/bin/java
if [[ -z "$DISABLE_JLINK" ]]; then
if test -f "jre/bin/java"; then
if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable
#remove the quarantine attribute so java is executable on mac
xattr -d com.apple.quarantine jre/bin/java
fi
chmod +x jre/bin/java #make sure java is executable
fi
chmod +x ../jre/bin/java #make sure java is executable
fi
if test -f "../jre/bin/java" ; then
if [[ "$OS" == "OSX" ]]; then
#mac doesn't allow random binaries to be executable
#remove the quarantine attribute so java is executable on mac
xattr -d com.apple.quarantine ../jre/bin/java
fi
chmod +x ../jre/bin/java #make sure java is executable
fi
fi
chip=$(uname -m)
get_java_no_jlink() {
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
echo "$JAVA_HOME/bin/java"