Run this script as root..... installs Open Office 2.0 onto a Mandriva 2005 system.
Code:
#/bin/bash
#
#####################################################################################
# #
# FILE: openoffice2install.sh #
# VERSION: 1.0 #
# DATE: 11-19-2005 #
# #
# AUTHOR: Dave Crouse <dave NOSPAMat usalug.org> #
# c/o USA Linux Users Group #
# PO Box 3210 #
# Des Moines, IA 50316-0210 #
# United States #
# #
# #
# Copyright (C) 2004-2005 Dave Crouse <dave NOSPAMat usalug.org> #
# All rights reserved. #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program 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 General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
#####################################################################################
checkforroot ()
{
clear
echo "Open Office 2.0 Installation Script"
echo ""
echo "This script needs to be run as root."
echo "Now checking for root permissions"
sleep 1
ROOT_UID=0
if [ "$UID" -ne "$ROOT_UID" ]
then
echo ""
echo "**************** ERROR !! **************"
echo "You must be logged in as root to run this script"
echo "Please log in as root and re-run this script."
echo "Program HALTED."
sleep 1
echo ""
echo "This script is located in the following directory"
pwd
echo ""
echo "**************** ERROR !! **************"
exit
fi
echo "You are running as root.. good .. moving along now ;) "
sleep 2
}
checkforroot
mkdir ~/openoffice
cd ~/openoffice
echo "Downloading Open Office 2.0"
wget ftp://openoffice.mirrors.pair.com/stable/2.0.0/OOo_2.0.0_LinuxIntel_install.tar.gz
echo ""
echo "Preparing to unpack Open Office 2.0"
echo ""
sleep 1
tar xvzf OOo_2.0.0_LinuxIntel_install.tar.gz
cd OOO680_m3_native_packed-2_en-US.8968
cd RPMS
echo ""
echo "Preparing to install Open Office 2.0"
echo ""
sleep 1
rpm -Uvih *rpm
cd /root/openoffice/OOO680_m3_native_packed-2_en-US.8968/RPMS/desktop-integration
echo ""
echo "Installation Complete"
echo "Preparing to install Mandriva Menus"
echo ""
sleep 1
rpm -Uvih openoffice.org-mandriva-menus-2.0.0-3.noarch.rpm
echo ""
echo "Menu Installation Complete"
echo ""
echo "if you wish to remove the downloaded files issue the following command :"
echo "rm -Rf ~/openoffice"
echo ""
echo "Installation of Open Office 2.0 is now Complete :) "
echo ""
echo ""
exit