if [ -z “ U N A M E " − o − z " UNAME" -o -z " UNAME"−o−z"GREP” -o -z “ C U T " − o − z " CUT" -o -z " CUT"−o−z"MKTEMP” -o -z “ R M " − o − z " RM" -o -z " RM"−o−z"CAT” -o -z “$TR” ]; then
message “Required tools are missing - check beginning of \”$0\" file for details."
exit 1
fi
OS_TYPE=`“$UNAME” -s`
# ---------------------------------------------------------------------
# Ensure IDE_HOME points to the directory where the IDE is installed.
# ---------------------------------------------------------------------
SCRIPT_LOCATION=$0
if [ -x “$READLINK” ]; then
while [ -L “$SCRIPT_LOCATION” ]; do
SCRIPT_LOCATION=`“ R E A D L I N K " − e " READLINK" -e " READLINK"−e"SCRIPT_LOCATION”`
done
fi
IDE_BIN_HOME=`dirname “$SCRIPT_LOCATION”`
if [ “$IDE_BIN_HOME” = “.” ]; then
IDE_HOME=“…”
else
IDE_HOME=`dirname “$IDE_BIN_HOME”`
fi
# ---------------------------------------------------------------------
# Locate a JDK installation directory which will be used to run the IDE.
# Try (in order): STUDIO_JDK, studio.jdk, …/jre, JDK_HOME, JAVA_HOME, “java” in PATH.
# ---------------------------------------------------------------------
JDK=“”
if isJDK $STUDIO_JDK; then
JDK=“$STUDIO_JDK”
fi
if [ “KaTeX parse error: Can't use function '\]' in math mode at position 11: JDK" = "" \̲]̲ && \[ -s "HOME/.AndroidStudio3.0/config/studio.jdk” ]; then
JDK=`“$CAT” $HOME/.AndroidStudio3.0/config/studio.jdk`
if [ ! -d “$JDK” ]; then
JDK=“ I D E _ H O M E / IDE\_HOME/ IDE_