summaryrefslogtreecommitdiff
path: root/desktop/scripts/unopkg.sh
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/scripts/unopkg.sh')
-rwxr-xr-x[-rw-r--r--]desktop/scripts/unopkg.sh40
1 files changed, 28 insertions, 12 deletions
diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh
index 2be74935ef..07811c5a5e 100644..100755
--- a/desktop/scripts/unopkg.sh
+++ b/desktop/scripts/unopkg.sh
@@ -31,21 +31,20 @@ 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"
# this is a temporary hack until we can live with the default search paths
case "`uname -s`" in
-OpenBSD)
+NetBSD|OpenBSD|FreeBSD|DragonFly)
sd_prog1="$sd_prog/../basis-link/program"
sd_prog2="$sd_prog/../basis-link/ure-link/lib"
LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
@@ -55,20 +54,37 @@ OpenBSD)
export JAVA_HOME
fi
;;
+AIX)
+ sd_prog1="$sd_prog/../basis-link/program"
+ sd_prog2="$sd_prog/../basis-link/ure-link/lib"
+ LIBPATH=$sd_prog1:$sd_prog2${LIBPATH:+:${LIBPATH}}
+ export LIBPATH
+ ;;
esac
#collect all bootstrap variables specified on the command line
#so that they can be passed as arguments to javaldx later on
+#Recognize the "sync" option. sync must be applied without any other
+#options except bootstrap variables or the verbose option
for arg in $@
do
case "$arg" in
-env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
+ sync) OPTSYNC=true;;
+ -v) VERBOSE=true;;
+ --verbose) VERBOSE=true;;
+ *) OPTOTHER=$arg;;
esac
done
+if [ "$OPTSYNC" = "true" ] && [ -z "$OPTOTHER" ]
+then
+ JVMFWKPARAMS='-env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+fi
+
# extend the ld_library_path for java: javaldx checks the sofficerc for us
if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
- my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
+ my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS $JVMFWKPARAMS \
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
if [ -n "$my_path" ] ; then
sd_platform=`uname -s`
@@ -94,6 +110,6 @@ unset XENVIRONMENT
# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
# execute binary
-exec "$sd_prog/unopkg.bin" "$@" \
+exec "$sd_prog/unopkg.bin" "$@" "$JVMFWKPARAMS" \
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"