1.1 --- a/src/os/posix/launcher/launcher.script Mon Oct 10 08:40:34 2011 -0700 1.2 +++ b/src/os/posix/launcher/launcher.script Tue Oct 11 10:21:36 2011 +0200 1.3 @@ -1,6 +1,6 @@ 1.4 #!/bin/sh 1.5 1.6 -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 1.7 +# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 1.8 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.9 # 1.10 # This code is free software; you can redistribute it and/or modify it 1.11 @@ -69,8 +69,8 @@ 1.12 # 1.13 1.14 # Make sure the paths are fully specified, i.e. they must begin with /. 1.15 -SCRIPT=$(cd $(dirname $0) && pwd)/$(basename $0) 1.16 -RUNDIR=$(pwd) 1.17 +REL_MYDIR=`dirname $0` 1.18 +MYDIR=`cd $REL_MYDIR && pwd` 1.19 1.20 # Look whether the user wants to run inside gdb 1.21 case "$1" in 1.22 @@ -95,12 +95,9 @@ 1.23 ;; 1.24 esac 1.25 1.26 -# Find out the absolute path to this script 1.27 -MYDIR=$(cd $(dirname $SCRIPT) && pwd) 1.28 - 1.29 JDK= 1.30 if [ "${ALT_JAVA_HOME}" = "" ]; then 1.31 - source ${MYDIR}/jdkpath.sh 1.32 + . ${MYDIR}/jdkpath.sh 1.33 else 1.34 JDK=${ALT_JAVA_HOME%%/jre}; 1.35 fi 1.36 @@ -119,9 +116,6 @@ 1.37 JAVA_HOME=$JDK 1.38 ARCH=@@LIBARCH@@ 1.39 1.40 -# Find out the absolute path to this script 1.41 -MYDIR=$(cd $(dirname $SCRIPT) && pwd) 1.42 - 1.43 SBP=${MYDIR}:${JRE}/lib/${ARCH} 1.44 1.45 # Set up a suitable LD_LIBRARY_PATH 1.46 @@ -146,7 +140,7 @@ 1.47 fi 1.48 1.49 GDBSRCDIR=$MYDIR 1.50 -BASEDIR=$(cd $MYDIR/../../.. && pwd) 1.51 +BASEDIR=`cd $MYDIR/../../.. && pwd` 1.52 1.53 init_gdb() { 1.54 # Create a gdb script in case we should run inside gdb 1.55 @@ -179,7 +173,7 @@ 1.56 init_gdb 1.57 # First find out what emacs version we're using, so that we can 1.58 # use the new pretty GDB mode if emacs -version >= 22.1 1.59 - case $($EMACS -version 2> /dev/null) in 1.60 + case `$EMACS -version 2> /dev/null` in 1.61 *GNU\ Emacs\ 2[23]*) 1.62 emacs_gud_cmd="gdba" 1.63 emacs_gud_args="--annotate=3"