Hi,
I updated my Tcl installation script for OOo 2.0. To use it
- su - root
- Extract the RPMS somewhere
- install the script in the parent directory of RPMS so that a directory
listing shows:
install.tcl
RPMS/openofficeorg-core01-1.9.91.i586.rpm
RPMS/openofficeorg-core02-.....
.
.
.
- Execute the script:
tclsh install.tcl
What happens:
- The script determines the latest version of OOo in the RPMS directory
- It tries to remove whatever version of OOo 2.0 is already installed. If
more than one version exists, it does not remove it but prints an error
message on the console.
- It installs the new version
- It creates a link in /opt/openffice that points to the newly installed
version
What it doesn't do:
- Any checking of any kind. So it can possibly hose your system
irremediably. It shouldn't, but it can.
- Anything fancy. It doesn't try to be intelligent and assumes you know
what you are doing
- Error recovery. It just tries to install everything. Even if something
fails, it keeps on going.
It's useful for me so I figure others might interested. I may make it
better or more intelligent, but not for my sake. If it's useful to you and
you think an additional feature may make it even more useful, let me know
and I'll try implement it in my Copious Spare Time(tm).
L
----------- Start of script -----------------
#!/bin/sh
#\
exec tclsh $0 $@
# Get version number to install
set tl [lsort [glob RPMS/openofficeorg-writer*.rpm]]
set tl [lindex $tl end]
regexp {RPMS/openofficeorg-writer-(.*).i586.rpm} $tl -> version
puts "Version to install: $version"
set rpms {
openofficeorg-calc
openofficeorg-core01
openofficeorg-core02
openofficeorg-core03
openofficeorg-core04
openofficeorg-core05
openofficeorg-core06
openofficeorg-core07
openofficeorg-core08
openofficeorg-draw
openofficeorg-gnome-integration
openofficeorg-graphicfilter
openofficeorg-impress
openofficeorg-javafilter
openofficeorg-math
openofficeorg-pyuno
openofficeorg-redhat-menus
openofficeorg-spellcheck
openofficeorg-suse-menus
openofficeorg-testtool
openofficeorg-writer
openofficeorg-xsltfilter
}
set oldVersion [lindex $argv 0]
set newVersion [lindex $argv 1]
puts "Removing old version"
foreach rpm $rpms {
puts "Removing $rpm"
catch {exec rpm --nodeps -e $rpm} msg
puts "$msg"
}
puts "Installing new version"
foreach rpm $rpms {
puts "Installing $rpm"
catch {exec rpm --nodeps -i RPMS/$rpm-$version*.rpm} msg
puts "$msg"
}
# Remove dash from version number
regexp {([^-]+)} $version -> version
puts "Adding link for version $version"
file delete /opt/openoffice
file link /opt/openoffice /opt/openoffice.org$version
--------------- End of script ---------------------
--
<Laurent Duperval> [EMAIL PROTECTED]
Hardware, n.:
The parts of a computer system that can be kicked.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]