#!/bin/sh # # $FreeBSD: /tmp/pcvs/ports/editors/openoffice.org-2.0-devel/files/Attic/openoffice-wrapper,v 1.9 2003-09-14 21:52:25 mbr Exp $ oopath=%%PREFIX%%/OpenOffice.org-%%FRELEASE_NR%%/program/ program=`echo $0 | sed -e 's|.*-%%RELEASE_NR%%-||'` if [ ! $LANG ]; then export LANG=%%LANG%% fi save_common_xcu() { sed 's/^X//' > tmp/Common.xcu << 'END-of-Common.xcu' X X X X X X X X X X true X X X X X X X X X X X %%mozilla%% X X X X X X X X X END-of-Common.xcu mozilla=`which mozilla`; if [ $? -eq 0 ]; then sed -i orig -e 's#%%mozilla%%#'$mozilla'#g' tmp/Common.xcu fi mozilla=`which linux-mozilla`; if [ $? -eq 0 ]; then sed -i orig -e 's#%%mozilla%%#'$mozilla'#g' tmp/Common.xcu fi mv tmp/Common.xcu user/registry/data/org/openoffice/Office } if [ -e $HOME/OpenOffice.org%%FRELEASE_NR%%/setup ]; then cd $HOME/OpenOffice.org%%FRELEASE_NR%% if [ ! -e $HOME/OpenOffice.org%%FRELEASE_NR%%/user/config/soffice.cfg ]; then touch $HOME/OpenOffice.org%%FRELEASE_NR%%/user/config/soffice.cfg fi if [ ! -e user/registry/data/org/openoffice/Office/Common.xcu ]; then mkdir -p tmp; save_common_xcu; fi fi case $program in $0) cd $oopath && ./soffice "$@" ;; *) cd $oopath && exec ./$program "$@" ;; esac