Skip to content

Commit 06e7677

Browse files
committed
Fix the setup; also add a file to gitignore
1 parent 5693e2c commit 06e7677

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/bin/setup.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
#!/bin/bash
1+
# source setup.sh
22
umask 27
33
#
44
# Make sure that the JAVA_HOME environment variable is set to point to a
55
# JDK 8 or higher JVM (and that it isn't OpenJDK).
66
#
77
if [ "${JAVA_HOME}" = "" ]; then
88
echo "Please set the JAVA_HOME environment variable to point to a Java 8 installation" >&2
9-
exit 2
9+
return
1010
elif [ ! -d "${JAVA_HOME}" ]; then
1111
echo "Your JAVA_HOME environment variable to points to a non-existent directory: ${JAVA_HOME}" >&2
12-
exit 2
12+
return
1313
fi
1414

1515
if [ -x "${JAVA_HOME}/bin/java" ]; then
1616
JAVA_EXE=${JAVA_HOME}/bin/java
1717
else
1818
echo "Java executable at ${JAVA_HOME}/bin/java either does not exist or is not executable" >&2
19-
exit 2
19+
return
2020
fi
2121

2222
JVM_OUTPUT=`${JAVA_EXE} -version 2>&1`
2323
case "${JVM_OUTPUT}" in
2424
*OpenJDK*)
2525
echo "JAVA_HOME ${JAVA_HOME} contains OpenJDK, which is not supported" >&2
26-
exit 2
26+
return
2727
;;
2828
esac
2929

@@ -45,7 +45,7 @@ echo $RESULT_PATH
4545
}
4646

4747
unalias imagebuilder 2> /dev/null
48-
script_dir=$( dirname "$( read_link "${BASH_SOURCE[-1]}" )" )
48+
script_dir=$( dirname "$( read_link "${BASH_SOURCE[0]}" )" )
4949
IMAGEBUILDER_HOME=`cd "${script_dir}/.." ; pwd`
5050
export IMAGEBUILDER_HOME
5151
alias imagebuilder="${JAVA_HOME}/bin/java -cp \"${IMAGEBUILDER_HOME}/lib/*\" com.oracle.weblogicx.imagebuilder.cli.CLIDriver"

0 commit comments

Comments
 (0)