From bb935110cddc98b9e54db4587deaf11aa1913226 Mon Sep 17 00:00:00 2001 From: brutisso Date: Tue, 11 Oct 2011 10:21:36 +0200 Subject: [PATCH] 7099454: /bin/sh does not support syntax used in the src/os/posix/launcher/launcher.script shell script Summary: Also reviewed by mikael.gerdin@oracle.com; Changed to the `` syntax instead. Also changed "source" to ".". Reviewed-by: never, stefank, dsamersoff, rottenha --- src/os/posix/launcher/launcher.script | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/os/posix/launcher/launcher.script b/src/os/posix/launcher/launcher.script index 21bf44e92..c4db5a423 100644 --- a/src/os/posix/launcher/launcher.script +++ b/src/os/posix/launcher/launcher.script @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -69,8 +69,8 @@ EMACS=emacs # # Make sure the paths are fully specified, i.e. they must begin with /. -SCRIPT=$(cd $(dirname $0) && pwd)/$(basename $0) -RUNDIR=$(pwd) +REL_MYDIR=`dirname $0` +MYDIR=`cd $REL_MYDIR && pwd` # Look whether the user wants to run inside gdb case "$1" in @@ -95,12 +95,9 @@ case "$1" in ;; esac -# Find out the absolute path to this script -MYDIR=$(cd $(dirname $SCRIPT) && pwd) - JDK= if [ "${ALT_JAVA_HOME}" = "" ]; then - source ${MYDIR}/jdkpath.sh + . ${MYDIR}/jdkpath.sh else JDK=${ALT_JAVA_HOME%%/jre}; fi @@ -119,9 +116,6 @@ JRE=$JDK/jre JAVA_HOME=$JDK ARCH=@@LIBARCH@@ -# Find out the absolute path to this script -MYDIR=$(cd $(dirname $SCRIPT) && pwd) - SBP=${MYDIR}:${JRE}/lib/${ARCH} # Set up a suitable LD_LIBRARY_PATH @@ -146,7 +140,7 @@ if [ ! -x $LAUNCHER ] ; then fi GDBSRCDIR=$MYDIR -BASEDIR=$(cd $MYDIR/../../.. && pwd) +BASEDIR=`cd $MYDIR/../../.. && pwd` init_gdb() { # Create a gdb script in case we should run inside gdb @@ -179,7 +173,7 @@ case "$MODE" in init_gdb # First find out what emacs version we're using, so that we can # use the new pretty GDB mode if emacs -version >= 22.1 - case $($EMACS -version 2> /dev/null) in + case `$EMACS -version 2> /dev/null` in *GNU\ Emacs\ 2[23]*) emacs_gud_cmd="gdba" emacs_gud_args="--annotate=3" -- GitLab