3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 MYUID
=`id | sed "s/(.*//g" | sed "s/.*=//"`
24 echo You need to have super-user rights to
install this language package
28 linenum
=LINENUMBERPLACEHOLDER
30 # Determining current platform
47 LICENSEFILEPLACEHOLDER
51 while [ x
$agreed = x
]; do
53 echo "Do you agree to the above license terms? [yes or no] "
59 echo "If you don't agree to the license you can't install this software";
66 SEARCHPACKAGENAME
="BASISPACKAGEPREFIXPLACEHOLDERPRODUCTVERSIONPLACEHOLDER-core01"
68 echo "Searching for the FULLPRODUCTNAMELONGPLACEHOLDER installation ..."
69 PACKAGENAME
=`pkginfo -x | grep $SEARCHPACKAGENAME | sed "s/ .*//"`
70 if [ "x$PACKAGENAME" != "x" ]
72 PRODUCTINSTALLLOCATION
="`pkginfo -r $PACKAGENAME`"
74 echo "FULLPRODUCTNAMELONGPLACEHOLDER not installed (no package $SEARCHPACKAGENAME installed)"
79 SEARCHPACKAGENAME
="BASISPACKAGEPREFIXPLACEHOLDERPRODUCTVERSIONPLACEHOLDER-core01"
80 FIXPATH
="/openoffice.org"
82 echo "Searching for the FULLPRODUCTNAMELONGPLACEHOLDER installation ..."
83 RPMNAME
=`rpm -qa | grep $SEARCHPACKAGENAME`
84 if [ "x$RPMNAME" != "x" ]
86 PRODUCTINSTALLLOCATION
="`rpm -ql $RPMNAME | head -n 1`"
88 echo "FULLPRODUCTNAMELONGPLACEHOLDER not installed (no package $SEARCHPACKAGENAME installed)"
91 PRODUCTINSTALLLOCATION
=`echo $PRODUCTINSTALLLOCATION | sed "s#${FIXPATH}##"`
94 echo "Unsupported platform"
99 # Asking for the installation directory
102 # echo "Where do you want to install the language pack ? [$PRODUCTINSTALLLOCATION] "
103 # read reply leftover
104 # if [ "x$reply" != "x" ]
106 # PRODUCTINSTALLLOCATION="$reply"
111 outdir
=/var
/tmp
/install_$$
114 #diskSpace=`df -k $outdir | $tail_prog -1 | awk '{if ( $4 ~ /%/) { print $3 } else { print $4 } }'`
115 #if [ $diskSpace -lt $diskSpaceRequired ]; then
116 # printf "You will need at least %s kBytes of free disk space\n" $diskSpaceRequired
117 # printf "Please free up the required disk space and try again\n"
121 trap 'rm -rf $outdir; exit 1' HUP INT QUIT TERM
122 echo "Unpacking and installing..."
124 #if [ -x /usr/bin/sum ] ; then
125 # echo "Checksumming..."
127 # sum=`/usr/bin/sum $outdir/$outname`
140 # if expr $sum1 != <sum1replace> || expr $sum2 != <sum2replace> ; then
141 # echo "The download file appears to be corrupted. Please refer"
142 # echo "to the Troubleshooting section of the Installation"
146 # echo "Can't find /usr/bin/sum to do checksum. Continuing anyway."
151 $tail_prog +$linenum $0 | gunzip |
(cd $outdir; tar xvf
-)
152 adminfile
=$outdir/admin.$$
153 echo "basedir=$PRODUCTINSTALLLOCATION" > $adminfile
157 $tail_prog +$linenum $0 | gunzip |
(cd $outdir; tar xvf
-)
161 echo "Unsupported platform"