2 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
25 #***********************************************************************/
32 if [ x
${SOLARENV}x
= xx
]; then
33 echo No environment found
, please use
'configure' or
'setsolar'
37 echo "Usage: $SCRIPTNAME [-t DESTPATH] [-o] [-d] [-a]" >&2
39 echo "[-t] target path: path wehre tho office should installed to. The default is '$DESTPATH'" >&2
41 echo "[-o] force OpenOffice.org installation instead of StarOffice" >&2
43 echo "[-d] installation with debug output" >&2
45 echo "[-a] the office will be patched to run without FirstStartWizard" >&2
47 echo "[-i] impress should open documents without autopilot" >&2
51 if [ x
${USER}x
= xx
]; then
52 if [ x
${LOGNAME}x
= xx
]; then
53 echo "ERROR: could not determine username. Please export variable USER" >&2
64 while getopts ':mt:aicdhot' OPTION
; do
66 d
) PARAM
="$PARAM -debug true"
68 c
) PARAM
="$PARAM -cwscheckapi true"
70 o
) PARAM
="$PARAM -ooo true"
72 a
) PARAM
="$PARAM -autorun true"
74 i
) PARAM
="$PARAM -autoimpress true"
78 h
) usage
$EXIT_SUCCESS
80 \?) echo "unkown option \"-$OPTARG\"." >&2
83 *) echo "this is not possible...">&2
89 shift `expr $OPTIND - 1`
91 LOCALINSTALLDIR
=$DESTPATH/office
92 LOCALUNPACKDIR
=$DESTPATH/unpack
94 export LOCALINSTALLDIR
96 echo "export LOCALINSTALLDIR"
97 echo "export LOCALUNPACKDIR"
102 echo "### $SOLARENV/bin/installoffice.pl $PARAM -cleanup true $@"
103 exec perl
-w $SOLARENV/bin
/installoffice.pl
$PARAM -cleanup true $@