2002-05-07 06:58:19 -05:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
# This script starts a new shell and sets all enviroment variables, which
|
|
|
|
# are necessary for building the examples of the Office Development Kit.
|
|
|
|
# The Script was developed for the operating systems Solaris and Linux.
|
|
|
|
# Before the script could be executed the following variables have to be
|
|
|
|
# adjusted:
|
|
|
|
|
|
|
|
# Installation directory of the Software Development Kit.
|
|
|
|
# Example: SDK_HOME=/work/odk641
|
2002-05-10 06:50:46 -05:00
|
|
|
SDK_HOME=
|
2002-05-07 06:58:19 -05:00
|
|
|
|
|
|
|
# Office installation directory.
|
|
|
|
# Example: OFFICE_HOME=/opt/staroffice6.0
|
2002-05-10 06:50:46 -05:00
|
|
|
OFFICE_HOME=
|
2002-05-07 06:58:19 -05:00
|
|
|
|
|
|
|
# Directory of the make command.
|
|
|
|
# Example: SDK_MAKE=/usr/bin
|
2002-05-10 06:50:46 -05:00
|
|
|
SDK_MAKE=
|
2002-05-07 06:58:19 -05:00
|
|
|
|
|
|
|
# Directory of the C++ tools.
|
|
|
|
# Example: SDK_CPP_HOME=/usr/bin
|
2002-05-10 06:50:46 -05:00
|
|
|
SDK_CPP_HOME=
|
2002-05-07 06:58:19 -05:00
|
|
|
|
|
|
|
# Java installation directory.
|
|
|
|
# Example: SDK_JAVA_HOME=/usr/local/j2sdk1.4.0
|
2002-05-10 06:50:46 -05:00
|
|
|
SDK_JAVA_HOME=
|
2002-05-07 06:58:19 -05:00
|
|
|
|
|
|
|
# ANT installation directory.
|
|
|
|
# Example: SDK_ANT=/windows/daten/moving/jakarta-ant-1.4
|
|
|
|
# SDK_ANT=
|
|
|
|
|
|
|
|
|
|
|
|
# Check installation path for the StarOffice Development Kit.
|
|
|
|
if [ -z "$SDK_HOME" ]
|
|
|
|
then
|
|
|
|
echo Error: Please insert a correct value for the variable SDK_HOME.
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check installation path for the office.
|
|
|
|
if [ -z "$OFFICE_HOME" ]
|
|
|
|
then
|
|
|
|
echo Error: Please insert a correct value for the variable OFFICE_HOME.
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Get the operating system.
|
|
|
|
sd_platform=`uname -s`
|
|
|
|
|
|
|
|
# Set the directory name.
|
|
|
|
case $sd_platform in
|
|
|
|
SunOS)
|
|
|
|
directoryname=solsparc
|
|
|
|
;;
|
|
|
|
|
|
|
|
Linux)
|
|
|
|
directoryname=linux
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2002-05-10 06:50:46 -05:00
|
|
|
# Set library path.
|
|
|
|
LD_LIBRARY_PATH=$SDK_HOME/$directoryname/lib:$OFFICE_HOME/program:$LD_LIBRARY_PATH
|
|
|
|
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
|
|
|
|
# Set office program path.
|
|
|
|
OFFICE_PROGRAM_PATH=$OFFICE_HOME/program
|
|
|
|
|
|
|
|
export OFFICE_PROGRAM_PATH
|
|
|
|
|
|
|
|
|
2002-05-07 06:58:19 -05:00
|
|
|
# Add directory of the SDK tools to the path.
|
2002-05-10 06:50:46 -05:00
|
|
|
PATH=$SDK_HOME/$directoryname/bin:$OFFICE_PROGRAM_PATH:$PATH
|
2002-05-07 06:58:19 -05:00
|
|
|
|
|
|
|
# Add directory of the command make to the path, if necessary.
|
|
|
|
if [ -n "$SDK_MAKE" ]
|
|
|
|
then
|
2002-05-10 06:50:46 -05:00
|
|
|
PATH=$SDK_MAKE:$PATH
|
2002-05-07 06:58:19 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Add directory of the C++ tools to the path, if necessary.
|
|
|
|
if [ -n "$SDK_CPP_HOME" ]
|
|
|
|
then
|
2002-05-10 06:50:46 -05:00
|
|
|
PATH=$SDK_CPP_HOME:$PATH
|
2002-05-07 06:58:19 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Add directory of the Java tools to the path, if necessary.
|
|
|
|
if [ -n "$SDK_JAVA_HOME" ]
|
|
|
|
then
|
2002-05-10 06:50:46 -05:00
|
|
|
PATH=$SDK_JAVA_HOME/bin:$PATH
|
2002-05-07 06:58:19 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Add directory of the ANT tools to the path, if necessary.
|
|
|
|
if [ -n "$SDK_ANT" ]
|
|
|
|
then
|
2002-05-10 06:50:46 -05:00
|
|
|
PATH=$SDK_ANT/bin:PATH
|
2002-05-07 06:58:19 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
export PATH
|
|
|
|
|
|
|
|
# Starting a new shell with all necessary environment variables.
|
|
|
|
echo starting shell
|
|
|
|
"$SHELL" "$@"
|
|
|
|
echo shell terminated
|