From 2995f0dc49ce257738c7b9ee9a75b03c244060ca Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Fri, 30 May 2014 14:54:23 -0400 Subject: [PATCH] Removed `which` dependency, now using proper shell builtin. - `which` isn't installed by default on all distros. - `which` doesn't resolve exactly like the shell, potential bugs. - `which` unnecessary spawns a new process. Change-Id: Ie89ea78b6f4cfb9c5415e889ec0393924870d883 Signed-off-by: Daniel Farrell --- .../distribution/opendaylight/src/main/resources/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendaylight/distribution/opendaylight/src/main/resources/run.sh b/opendaylight/distribution/opendaylight/src/main/resources/run.sh index dba996a994..1e903d0650 100755 --- a/opendaylight/distribution/opendaylight/src/main/resources/run.sh +++ b/opendaylight/distribution/opendaylight/src/main/resources/run.sh @@ -13,7 +13,7 @@ if [[ $platform == 'linux' ]]; then if [[ -z ${JAVA_HOME} ]]; then # Find the actual location of the Java launcher: - java_launcher=`which java` + java_launcher=`command -v java` java_launcher=`readlink -f "${java_launcher}"` # Compute the Java home from the location of the Java launcher: -- 2.36.6