#!/bin/sh
################################################################################
# File: msofficeinstall.sh                                                     #
################################################################################
# This script installs Microsoft Office 2000 to the computer.  Each user needs #
# to install a separate configuration, this can be done by executing:          #
#    /usr/local/bin/msofficesetup.sh                                           #
# The script first installs WINE before installing the necessary user level    #
# scripts and tar bundles to enable a user install/setup.                      #
################################################################################

################################################################################
# Directories to get installation tar bundles from and to install MS Office    #
# to.                                                                          #
################################################################################
INSTALLDIR=/usr/local/share/msoffice
SCRIPTDIR=/usr/local/bin

################################################################################
# Actual program to use to uncompress the shared tar bundles.                  #
################################################################################
TAR=`which tar`

################################################################################
echo "Microsoft Office 2000 on WINE on FreeBSD Installation Script"
echo

################################################################################
# First install the wine package, without which nothing would run!             #
################################################################################
echo "Installing WINE (v20040505 with CUPS support)..."
pkg_add wine-20040505.tbz

################################################################################
# Create the directory where the setup tar bundles will be placed and copy the #
# files there.                                                                 #
################################################################################
echo "Installing User Installation Files..."
mkdir -p $INSTALLDIR

cp dotwine.tbz $INSTALLDIR
cp kdekonq.tbz $INSTALLDIR
cp kdemenu.tbz $INSTALLDIR
cp kdedesktop.tbz $INSTALLDIR

################################################################################
# Install the Local User Installation/Setup Script and application launching   #
# scripts to ($SCRIPTDIR)                                                      #
################################################################################
echo "Installing Exectuable Scripts..."
$TAR -xj -C $SCRIPTDIR -f msofficescripts.tbz

################################################################################
echo
echo "Installation complete."

