Difference between revisions of "User:Wope/Linux parallele Installation"
From Apache OpenOffice Wiki
Line 98: | Line 98: | ||
rpm) UNIXCMD="rpm2cpio " | rpm) UNIXCMD="rpm2cpio " | ||
UNIXCMD2="cpio -id";; | UNIXCMD2="cpio -id";; | ||
− | deb) UNIXCMD="dkpg-deb -x " | + | deb) UNIXCMD="dkpg-deb -x ." |
UNIXCMD2="tee";; # dummy command | UNIXCMD2="tee";; # dummy command | ||
*) echo "*** invalid UNIXTYP : $ UNIXTYP ***" | *) echo "*** invalid UNIXTYP : $ UNIXTYP ***" |
Revision as of 16:26, 23 March 2010
#!/bin/bash #************************************************************************* #* #* OpenOffice.org - a multi-platform office productivity suite #* #* $RCSfile: prepare.sh,v $ #* #* $Revision: 1.02 $ #* #* last change: $Author: wolfgangpechlaner $ $Date: 2010/03/19 18: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> [-o OPTDIR] [-d DOWNLOADDIR] [-l LANGID]" echo "###" echo "### MWS is the Master Workspace" } if [ $# -lt 2 ] then usage; 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;; *) echo "*** invalid parameter ***";; esac shift; shift done if [ ! -d $OPTDIR ] then mkdir $OPTDIR echo "*** directory $OPTDIR created ***" fi echo "Downloaddir : $DOWNLOADDIR" echo "Optdir : $OPTDIR" echo "Langid : $LANGID" case $UNIXTYP in rpm) UNIXCMD="rpm2cpio " UNIXCMD2="cpio -id";; deb) UNIXCMD="dkpg-deb -x ." UNIXCMD2="tee";; # dummy command *) echo "*** invalid UNIXTYP : $ UNIXTYP ***" exit -1;; esac if [ ! -f $DOWNLOADDIR/$PREFIXTAR$MWS\_$MS\_$TYP\install_en-US.*tar.gz ] then echo "** file $PREFIXTAR$MWS\_$MS\_$TYP\install_en-US.tar.gz not found **" 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 **" exit 1 fi if [ -d $OPTDIR/opt ] ;then echo "******* delete the old files *******" rm -rf $OPTDIR/opt fi echo "******* unpack the tar.gz files *******" cd $DOWNLOADDIR tar -xzf $PREFIXTAR$MWS\_$MS\_$TYP\install_en-US.*tar.gz tar -xzf $PREFIXTAR$MWS\_$MS\_$TYP\langpack_$LANGID.*tar.gz echo "******* install $UNIXTYP files *******" cd $OPTDIR for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_en-US.*/????/o*.$UNIXTYP do $UNIXCMD $i | $UNIXCMD2 2>/dev/null done for i in $DOWNLOADDIR/$MWS\_$MS\_native_packed*_$LANGID.*/????/o*.$UNIXTYP do $UNIXCMD $i | $UNIXCMD2 2>/dev/null done echo "******* test start OOo $MWS_$MS *******" $OPTDIR/opt/ooo-dev3/program/soffice