diff options
Diffstat (limited to 'desktop/scripts/soffice.sh')
-rw-r--r-- | desktop/scripts/soffice.sh | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index 0215f88d1ff0..5083bf285c14 100644 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -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" |