sb126: #i112542# resolve $0 symlinks recursively in start scripts (based on a patch by pooryorick)
This commit is contained in:
parent
4740aded6e
commit
c6d6e6bf9f
@ -43,15 +43,14 @@ export SAL_ENABLE_FILE_LOCKING
|
||||
#@# export JITC_PROCESSOR_TYPE=6
|
||||
|
||||
# resolve installation directory
|
||||
sd_cwd="`pwd`"
|
||||
if [ -h "$0" ] ; then
|
||||
sd_basename=`basename "$0"`
|
||||
sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
|
||||
cd "`dirname "$0"`"
|
||||
cd "`dirname "$sd_script"`"
|
||||
else
|
||||
cd "`dirname "$0"`"
|
||||
fi
|
||||
sd_cwd=`pwd`
|
||||
sd_res=$0
|
||||
while [ -h "$sd_res" ] ; do
|
||||
cd "`dirname "$sd_res"`"
|
||||
sd_basename=`basename "$sd_res"`
|
||||
sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
|
||||
done
|
||||
cd "`dirname "$sd_res"`"
|
||||
sd_prog=`pwd`
|
||||
cd "$sd_cwd"
|
||||
|
||||
|
@ -29,14 +29,13 @@
|
||||
set -e
|
||||
|
||||
# resolve installation directory
|
||||
if [ -h "$0" ] ; then
|
||||
sd_basename=`basename "$0"`
|
||||
sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
|
||||
cd "`dirname "$0"`"
|
||||
cd "`dirname "$sd_script"`"
|
||||
else
|
||||
cd "`dirname "$0"`"
|
||||
fi
|
||||
sd_res=$0
|
||||
while [ -h "$sd_res" ] ; do
|
||||
cd "`dirname "$sd_res"`"
|
||||
sd_basename=`basename "$sd_res"`
|
||||
sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
|
||||
done
|
||||
cd "`dirname "$sd_res"`"
|
||||
sd_prog=`pwd`
|
||||
|
||||
case $1 in
|
||||
|
@ -31,15 +31,14 @@ SAL_ENABLE_FILE_LOCKING=1
|
||||
export SAL_ENABLE_FILE_LOCKING
|
||||
|
||||
# resolve installation directory
|
||||
sd_cwd="`pwd`"
|
||||
if [ -h "$0" ] ; then
|
||||
sd_basename=`basename "$0"`
|
||||
sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
|
||||
cd "`dirname "$0"`"
|
||||
cd "`dirname "$sd_script"`"
|
||||
else
|
||||
cd "`dirname "$0"`"
|
||||
fi
|
||||
sd_cwd=`pwd`
|
||||
sd_res=$0
|
||||
while [ -h "$sd_res" ] ; do
|
||||
cd "`dirname "$sd_res"`"
|
||||
sd_basename=`basename "$sd_res"`
|
||||
sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
|
||||
done
|
||||
cd "`dirname "$sd_res"`"
|
||||
sd_prog=`pwd`
|
||||
cd "$sd_cwd"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user