I'm writing an addon to OpenOffice.org and I need to be able to autodetect where on the system
the use has installed OpenOffice.org. So far I've got the following bash script:
echo "Where is the man OpenOffice Install"
read location
echo "" >> /etc/profile
echo "export PATH=\"\$PATH:$location/program\" " >> /etc/profile
echo "export EOFFICE=\"$location\" " >> /etc/profile
That lets me use the oo location in my scripts but I'd prefer to autodetect
the program location. OpenOffice puts the .sversionrc file in the users home directory
containing the following text:
[Versions]
OpenOffice.org 1.0=file:///home/sisob/OpenOffice.org1.0
I need to suck out the location, in this case /home/sisob/OpenOffice.org1.0
to use in the bash script. Anyone want to right me a scriptlet in perl of bash
or something standard like that. Go on: show us all how leet a coder you are.
Any ideas?
--
Mark Finlay
"sisob's linux eXPerience"
http://sisob.dyndns.org
Registered Linux User: #243436
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!