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
=`mktemp -d -p /var/tmp`
113 #diskSpace=`df -k $outdir | $tail_prog -1 | awk '{if ( $4 ~ /%/) { print $3 } else { print $4 } }'`
114 #if [ $diskSpace -lt $diskSpaceRequired ]; then
115 # printf "You will need at least %s kBytes of free disk space\n" $diskSpaceRequired
116 # printf "Please free up the required disk space and try again\n"
120 trap 'rm -rf $outdir; exit 1' HUP INT QUIT TERM
121 echo "Unpacking and installing..."
123 #if [ -x /usr/bin/sum ] ; then
124 # echo "Checksumming..."
126 # sum=`/usr/bin/sum $outdir/$outname`
139 # if expr $sum1 != <sum1replace> || expr $sum2 != <sum2replace> ; then
140 # echo "The download file appears to be corrupted. Please refer"
141 # echo "to the Troubleshooting section of the Installation"
145 # echo "Can't find /usr/bin/sum to do checksum. Continuing anyway."
150 $tail_prog +$linenum $0 | gunzip |
(cd $outdir; tar xvf
-)
151 adminfile
=$outdir/admin.$$
152 echo "basedir=$PRODUCTINSTALLLOCATION" > $adminfile
156 $tail_prog +$linenum $0 | gunzip |
(cd $outdir; tar xvf
-)
160 echo "Unsupported platform"