diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-10-05 08:20:11 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-10-05 08:20:11 +0000 |
commit | cc26ea953860034dcbaeef699dcbc64854b450ef (patch) | |
tree | eed017c900530fad198c7a789df2d9bfa8796d9a /setup_native/scripts | |
parent | 4636ece92e3829cca7fcb7f24bfbc6186ca21bcb (diff) |
INTEGRATION: CWS native61 (1.15.78); FILE MERGED
2006/09/19 14:35:49 is 1.15.78.5: #i68850# mktemp also for linux
2006/09/19 14:03:02 is 1.15.78.4: #i68850# mktemp also for linux
2006/09/19 14:01:29 is 1.15.78.3: #i68850# mktemp also for linux
2006/09/07 15:20:28 is 1.15.78.2: #i68850# userscripts with language pack functionality
2006/09/06 10:29:45 is 1.15.78.1: #i68850# linux user script also for language pack
Diffstat (limited to 'setup_native/scripts')
-rw-r--r-- | setup_native/scripts/install_linux.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/setup_native/scripts/install_linux.sh b/setup_native/scripts/install_linux.sh index f11dc7a14a5e..32f0f05238ea 100644 --- a/setup_native/scripts/install_linux.sh +++ b/setup_native/scripts/install_linux.sh @@ -2,6 +2,7 @@ LINK="no" UPDATE="ask" +UNPACKDIR="" USAGE="Usage: $0 [-l,--link] [-U,--update] [-h,--help] <rpm-source-dir> <office-installation-dir>" help() @@ -14,6 +15,7 @@ help() echo echo "Usage:" $0 [-lU] "<rpm-source-dir> <office-installation-dir>" echo " <rpm-source-dir>: directory *only* containing the Linux rpm packages to be installed" + echo " or language pack shell script containing the rpm packages" echo " <office-installation-dir>: directory to where the office will get installed into" echo echo "Optional Parameter:" @@ -23,6 +25,40 @@ help() echo } +try_to_unpack_languagepack_file() +{ + FILENAME=$PACKAGE_PATH + + # Checking, if $FILENAME is a language pack. + # String "language package" has to exist in the shell script file. + # If this is no language pack, the installation is not supported + + SEARCHSTRING=`head --lines=10 $FILENAME | grep "language package"` + + if [ ! -z "$SEARCHSTRING" ] + then + echo "First parameter $FILENAME is a language pack"; + else + printf "\nERROR: First parameter $FILENAME is a file, but no language pack shell script.\n" + echo $USAGE + exit 2 + fi + + echo "Unpacking shell script $FILENAME" + TAILLINE=`head --lines=20 $FILENAME | sed --quiet 's/linenum=//p'` + + UNPACKDIR=/var/tmp/install_$$ + mkdir $UNPACKDIR + # UNPACKDIR=`mktemp -d` + tail -n +$TAILLINE $FILENAME | gunzip | (cd $UNPACKDIR; tar xvf -) + + # Setting the new package path, in which the packages exist + PACKAGE_PATH=$UNPACKDIR + + # Setting variable UPDATE, because an Office installation has to exist, if a language pack shall be installed + UPDATE="yes" +} + # # this script is for userland not for root # @@ -61,6 +97,16 @@ fi PACKAGE_PATH=$1 # +# If the first parameter is a shell script (download installation set), the packages have to +# be unpacked into temp directory +# + +if [ -f "$PACKAGE_PATH" ] +then + try_to_unpack_languagepack_file +fi + +# # Check and get the list of packages to install # @@ -232,6 +278,14 @@ if [ -f $INSTALLDIR/program/bootstraprc ]; then sed 's/UserInstallation=$SYSUSERCONFIG.*/UserInstallation=$ORIGIN\/..\/UserInstallation/g' $INSTALLDIR/program/bootstraprc.orig > $INSTALLDIR/program/bootstraprc fi +# if an unpack directory exists, it can be removed now +if [ ! -z "$UNPACKDIR" ] +then + rm $UNPACKDIR/*.rpm + rmdir $UNPACKDIR + echo "Removed temporary directory $UNPACKDIR" +fi + echo echo "Installation done ..." |