On Thu, 31 Mar 2005 16:04:35 -0500, Laurent Duperval wrote:
> I have an Tcl install script that removes the previous OpenOffice version
> and installs the new one.
As i feared, i forgot.
Here is the script. To use it you must:
- Install Tcl (comes on most Linux distros)
- put it in the parent directory of the RPMS directory
- call it using: tclsh install.tcl <old-version-number>
<new-version-number>
Warning: there is no parameter checking so if you don't provide an old
version number, the latest version of the package will be removed (and I'm
not entirely sure the new one will be installed)
If you find it useful, drop me a note and I'll add parameter checking, the
ability to call it without the previous version number and anything else
that you find interesting and that I have time to code up.
Enjoy!
L
========= Start of code ================
#!/bin/sh
#\
exec tclsh $0 $@
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 version $oldVersion"
foreach rpm $rpms {
puts "Removing $rpm-$oldVersion"
catch {exec sudo rpm --nodeps -e $rpm-$oldVersion} msg
puts "$msg"
}
puts "Installing version $newVersion"
foreach rpm $rpms {
puts "Installing $rpm-$newVersion"
catch {exec sudo rpm --nodeps -i RPMS/$rpm-$newVersion*.rpm} msg
puts "$msg"
}
puts "Adding link"
file delete /opt/openoffice
file link /opt/openoffice.org$newVersion /opt/openoffice
========= End of code ================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]