Difference between revisions of "User:Wope/Linux parallele Installation"
From Apache OpenOffice Wiki
Line 5: | Line 5: | ||
#* OpenOffice.org - a multi-platform office productivity suite | #* OpenOffice.org - a multi-platform office productivity suite | ||
#* | #* | ||
− | #* $RCSfile: | + | #* $RCSfile: install.sh,v $ |
#* | #* | ||
#* $Revision: 1.02 $ | #* $Revision: 1.02 $ | ||
#* | #* | ||
− | #* last change: $Author: wolfgangpechlaner $ $Date: 2010/03/ | + | #* last change: $Author: wolfgangpechlaner $ $Date: 2010/03/31 08:50:00 $ |
#* | #* | ||
#* The Contents of this file are made available subject to | #* The Contents of this file are made available subject to | ||
Line 43: | Line 43: | ||
# - the opt-directory shall be expanded to $OPTDIR, | # - the opt-directory shall be expanded to $OPTDIR, | ||
# - the prefix of the tar.gz files is $PREFIXTAR | # - the prefix of the tar.gz files is $PREFIXTAR | ||
− | # | + | # - the langid is in $LANGID |
# input :2 parameters (MWS and Milestone of the desired version | # input :2 parameters (MWS and Milestone of the desired version | ||
# | # | ||
Line 57: | Line 57: | ||
######################################################################### | ######################################################################### | ||
usage() { | usage() { | ||
− | echo "### Usage: $0 <MWS> <Milestone> [-o OPTDIR] [-d DOWNLOADDIR] [-l LANGID]" | + | echo "### Usage: $0 <MWS> <Milestone>" |
− | echo "###" | + | echo "### [-o OPTDIR] [-d DOWNLOADDIR] [-l LANGID]" |
− | echo "### MWS is the Master Workspace" | + | echo "### [-p PREFIXTAR] [-t TYP]" |
+ | echo "### MWS is the Master Workspace (eg DEV300 or OOO320)" | ||
} | } | ||
+ | |||
+ | paramvalues() { | ||
+ | echo "Downloaddir : $DOWNLOADDIR" | ||
+ | echo "Optdir : $OPTDIR" | ||
+ | echo "Langid : $LANGID" | ||
+ | echo "Prefixtar : $PREFIXTAR" | ||
+ | echo "Unixtyp : $UNIXTYP" | ||
+ | echo "TYP : $TYP" | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
if [ $# -lt 2 ] | if [ $# -lt 2 ] | ||
then | then | ||
usage; | usage; | ||
+ | paramvalues; | ||
exit -1 | exit -1 | ||
else | else | ||
Line 80: | Line 94: | ||
-o) OPTDIR=$2;; | -o) OPTDIR=$2;; | ||
-l) LANGID=$2;; | -l) LANGID=$2;; | ||
− | *) echo "*** invalid parameter ***";; | + | -p) PREFIXTAR=$2;; |
+ | -u) UNIXTYP=$2;; | ||
+ | *) echo "*** invalid parameter ***" | ||
+ | usage; | ||
+ | paramvalues; | ||
+ | exit -1;; | ||
esac | esac | ||
shift; shift | shift; shift | ||
done | done | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
case $UNIXTYP in | case $UNIXTYP in | ||
− | rpm) | + | rpm) ;; |
− | + | deb) ;; | |
− | deb) | + | *) echo "*** invalid UNIXTYP ***" |
− | + | paramvalues; | |
− | *) echo "*** invalid UNIXTYP | + | |
exit -1;; | exit -1;; | ||
esac | esac | ||
Line 106: | Line 114: | ||
if [ ! -f $DOWNLOADDIR/$PREFIXTAR$MWS\_$MS\_$TYP\install_en-US.*tar.gz ] | if [ ! -f $DOWNLOADDIR/$PREFIXTAR$MWS\_$MS\_$TYP\install_en-US.*tar.gz ] | ||
then | then | ||
− | echo "** file $PREFIXTAR$ | + | echo "** file $PREFIXTAR$MWS_$MS_$TYPinstall_en-US.tar.gz not found **" |
+ | paramvalues; | ||
exit 1 | exit 1 | ||
fi | fi | ||
if [ ! -f $DOWNLOADDIR/$PREFIXTAR$MWS\_$MS\_$TYP\langpack_$LANGID.*tar.gz ] | if [ ! -f $DOWNLOADDIR/$PREFIXTAR$MWS\_$MS\_$TYP\langpack_$LANGID.*tar.gz ] | ||
then | then | ||
− | echo "** file $PREFIXTAR$ | + | echo "** file $PREFIXTAR$MWS_$MS_$TYP\langpack_$LANGID.tar.gz not found **" |
+ | paramvalues; | ||
exit 1 | exit 1 | ||
fi | fi | ||
+ | if [ ! -d $OPTDIR ] | ||
+ | then | ||
+ | mkdir $OPTDIR | ||
+ | echo "*** directory $OPTDIR created ***" | ||
+ | fi | ||
+ | |||
+ | paramvalues; | ||
if [ -d $OPTDIR/opt ] ;then | if [ -d $OPTDIR/opt ] ;then | ||
Line 123: | Line 140: | ||
cd $DOWNLOADDIR | cd $DOWNLOADDIR | ||
− | tar - | + | tar -xzvf $PREFIXTAR$MWS\_$MS\_$TYP\install_en-US.*tar.gz >$MWS\_$MS\_install.log |
− | tar - | + | tar -xzvf $PREFIXTAR$MWS\_$MS\_$TYP\langpack_$LANGID.*tar.gz >$MWS\_$MS\_install.log |
echo "******* install $UNIXTYP files *******" | echo "******* install $UNIXTYP files *******" | ||
cd $OPTDIR | cd $OPTDIR | ||
− | for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_en-US.*/????/o*.$UNIXTYP | + | case $UNIXTYP in |
− | do | + | rpm) |
− | done | + | for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_en-US.*/????/o*.$UNIXTYP |
− | for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_$LANGID.*/????/o*.$UNIXTYP | + | do rpm2cpio $i | cpio -id 2>>$MWS\_$MS\_install.log |
− | do | + | done |
− | done | + | for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_$LANGID.*/????/o*.$UNIXTYP |
+ | do rpm2cpio $i | cpio -id 2>>$MWS\_$MS\_install.log | ||
+ | done | ||
+ | ;; | ||
+ | deb) | ||
+ | for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_en-US.*/????/o*.$UNIXTYP | ||
+ | do dkpg-deb -x $i . 2>>$MWS\_$MS\_install.log | ||
+ | done | ||
+ | for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_$LANGID.*/????/o*.$UNIXTYP | ||
+ | do dkpg-deb -x $i . 2>>$MWS\_$MS\_install.log | ||
+ | done | ||
− | echo "******* | + | ;; |
+ | esac | ||
+ | |||
+ | echo "******* test start $MWS $MS *******" | ||
$OPTDIR/opt/ooo-dev3/program/soffice | $OPTDIR/opt/ooo-dev3/program/soffice | ||
+ | echo "******* logfile $MWS $MS install.log ******" | ||
+ | |||
</source> | </source> |
Revision as of 06:53, 6 April 2010
#!/bin/bash #************************************************************************* #* #* OpenOffice.org - a multi-platform office productivity suite #* #* $RCSfile: install.sh,v $ #* #* $Revision: 1.02 $ #* #* last change: $Author: wolfgangpechlaner $ $Date: 2010/03/31 08:50:00 $ #* #* The Contents of this file are made available subject to #* the terms of GNU Lesser General Public License Version 2.1. #* #* #* GNU Lesser General Public License Version 2.1 #* ============================================= #* Copyright 2005 by Sun Microsystems, Inc. #* 901 San Antonio Road, Palo Alto, CA 94303, USA #* #* This library is free software; you can redistribute it and/or #* modify it under the terms of the GNU Lesser General Public #* License version 2.1, as published by the Free Software Foundation. #* #* This library is distributed in the hope that it will be useful, #* but WITHOUT ANY WARRANTY; without even the implied warranty of #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #* Lesser General Public License for more details. #* #* You should have received a copy of the GNU Lesser General Public #* License along with this library; if not, write to the Free Software #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, #* MA 02111-1307 USA #* ######################################################################### # # Owner : wope@openoffice.org # # short description : prepares a 2nd Installation for testing # # it is assumed, that # - the tar.gz files are in $DOWNLOADDIR, # - the opt-directory shall be expanded to $OPTDIR, # - the prefix of the tar.gz files is $PREFIXTAR # - the langid is in $LANGID # input :2 parameters (MWS and Milestone of the desired version # ######################################################################### DOWNLOADDIR=$HOME/Downloads OPTDIR=$HOME PREFIXTAR=OOo-Dev_ LANGID=de TYP=LinuxX86-64_ # TYP=LinuxIntel UNIXTYP=rpm # UNIXTYP=deb ######################################################################### usage() { echo "### Usage: $0 <MWS> <Milestone>" echo "### [-o OPTDIR] [-d DOWNLOADDIR] [-l LANGID]" echo "### [-p PREFIXTAR] [-t TYP]" echo "### MWS is the Master Workspace (eg DEV300 or OOO320)" } paramvalues() { echo "Downloaddir : $DOWNLOADDIR" echo "Optdir : $OPTDIR" echo "Langid : $LANGID" echo "Prefixtar : $PREFIXTAR" echo "Unixtyp : $UNIXTYP" echo "TYP : $TYP" } if [ $# -lt 2 ] then usage; paramvalues; exit -1 else echo "*** $1_$2 would be installed ***" fi; export MWS="$1" export MS="$2" shift; shift # further parameters while [ $# -ge 2 ] do case $1 in -d) DOWNLODDIR=$2;; -o) OPTDIR=$2;; -l) LANGID=$2;; -p) PREFIXTAR=$2;; -u) UNIXTYP=$2;; *) echo "*** invalid parameter ***" usage; paramvalues; exit -1;; esac shift; shift done case $UNIXTYP in rpm) ;; deb) ;; *) echo "*** invalid UNIXTYP ***" paramvalues; exit -1;; esac if [ ! -f $DOWNLOADDIR/$PREFIXTAR$MWS\_$MS\_$TYP\install_en-US.*tar.gz ] then echo "** file $PREFIXTAR$MWS_$MS_$TYPinstall_en-US.tar.gz not found **" paramvalues; exit 1 fi if [ ! -f $DOWNLOADDIR/$PREFIXTAR$MWS\_$MS\_$TYP\langpack_$LANGID.*tar.gz ] then echo "** file $PREFIXTAR$MWS_$MS_$TYP\langpack_$LANGID.tar.gz not found **" paramvalues; exit 1 fi if [ ! -d $OPTDIR ] then mkdir $OPTDIR echo "*** directory $OPTDIR created ***" fi paramvalues; if [ -d $OPTDIR/opt ] ;then echo "******* delete the old files *******" rm -rf $OPTDIR/opt fi echo "******* unpack the tar.gz files *******" cd $DOWNLOADDIR tar -xzvf $PREFIXTAR$MWS\_$MS\_$TYP\install_en-US.*tar.gz >$MWS\_$MS\_install.log tar -xzvf $PREFIXTAR$MWS\_$MS\_$TYP\langpack_$LANGID.*tar.gz >$MWS\_$MS\_install.log echo "******* install $UNIXTYP files *******" cd $OPTDIR case $UNIXTYP in rpm) for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_en-US.*/????/o*.$UNIXTYP do rpm2cpio $i | cpio -id 2>>$MWS\_$MS\_install.log done for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_$LANGID.*/????/o*.$UNIXTYP do rpm2cpio $i | cpio -id 2>>$MWS\_$MS\_install.log done ;; deb) for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_en-US.*/????/o*.$UNIXTYP do dkpg-deb -x $i . 2>>$MWS\_$MS\_install.log done for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_$LANGID.*/????/o*.$UNIXTYP do dkpg-deb -x $i . 2>>$MWS\_$MS\_install.log done ;; esac echo "******* test start $MWS $MS *******" $OPTDIR/opt/ooo-dev3/program/soffice echo "******* logfile $MWS $MS install.log ******"