Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Integration of MDSAL into distribution"
[controller.git]
/
opendaylight
/
distribution
/
opendaylight
/
src
/
main
/
resources
/
run.sh
diff --git
a/opendaylight/distribution/opendaylight/src/main/resources/run.sh
b/opendaylight/distribution/opendaylight/src/main/resources/run.sh
index 313b3b2c79cdd18dbf585f6a76adbeecf8e688f9..2587a5d2ab54de060c4a258713352febf4c97725 100755
(executable)
--- a/
opendaylight/distribution/opendaylight/src/main/resources/run.sh
+++ b/
opendaylight/distribution/opendaylight/src/main/resources/run.sh
@@
-1,9
+1,5
@@
#!/bin/bash
#!/bin/bash
-[[ -z ${JAVA_HOME} ]] && echo "Need to set JAVA_HOME environment variable" && exit -1;
-[[ ! -x ${JAVA_HOME}/bin/java ]] && echo "Cannot find an executable \
-JVM at path ${JAVA_HOME}/bin/java check your JAVA_HOME" && exit -1;
-
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
@@
-32,8
+28,15
@@
elif [[ $platform == 'osx' ]]; then
PHYS_DIR=`pwd -P`
RESULT=$PHYS_DIR/$TARGET_FILE
fullpath=$RESULT
PHYS_DIR=`pwd -P`
RESULT=$PHYS_DIR/$TARGET_FILE
fullpath=$RESULT
+
+ [[ -z ${JAVA_HOME} ]] && [[ -x "/usr/libexec/java_home" ]] && export JAVA_HOME=`/usr/libexec/java_home -v 1.7`;
+
fi
fi
+[[ -z ${JAVA_HOME} ]] && echo "Need to set JAVA_HOME environment variable" && exit -1;
+[[ ! -x ${JAVA_HOME}/bin/java ]] && echo "Cannot find an executable \
+JVM at path ${JAVA_HOME}/bin/java check your JAVA_HOME" && exit -1;
+
basedir=`dirname ${fullpath}`
function usage {
basedir=`dirname ${fullpath}`
function usage {