On Fri, 7 Mar 2003, han wrote:

> Of course that gives problems with relative pathnames that are not deep
> enough.

Yes, on my test machine, there are four "..".

Does this patch help? You probably have some weird ls that doesn't match 
what the soffice script expects?

--- soffice     2003-03-06 14:41:00.000000000 +0100
+++ /usr/lib/openoffice/program/soffice 2003-03-07 11:43:46.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #*************************************************************************
 #
 #   $RCSfile: soffice.sh,v $
@@ -88,7 +88,8 @@
 sd_cwd="`pwd`"
 if $test -L "$0" ; then
        sd_basename=`basename "$0"`
-       sd_script=`ls -l $0 | sed "s/.*${sd_basename} -> //g"` 
+       # perl is in perl-base, thus basesystem
+       sd_script=`perl -e "print readlink shift" $0`
        sd_sub=`echo $sd_script | cut -f1 -d/`
        if [ "$sd_sub" = ".." -a "$SO_MODE" = "" ]; then
                SO_MODE="remote"
@@ -247,14 +248,23 @@
 PATH="$sd_prog":$PATH
 export PATH
 
+# use --args option for gdb, if necessary
+case "$SAL_DEBUGGER" in
+  *gdb*--args*)
+    ;;
+  *gdb*)
+    SAL_DEBUGGER="$SAL_DEBUGGER --args"
+    ;;
+esac
+
 # execute soffice binary
 # there is a bug in solaris sh that prevents the use of "$@"
 # because it cannot cope with spaces in directory names
 if [ "X${plugin_mode}" = "Xtrue" ]; then
        SAL_IGNOREXERRORS=true
        export SAL_IGNOREXERRORS
-       exec "$sd_prog/$sd_binary" -plugin "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
+       exec $SAL_DEBUGGER "$sd_prog/$sd_binary" -plugin ${1+"$@"}
 else
-       exec "$sd_prog/$sd_binary" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
+       exec $SAL_DEBUGGER "$sd_prog/$sd_binary" ${1+"$@"}
 fi
 


Reply via email to