[ILUG] OpenOffice.org Location
Mark Finlay
sisob at eircom.net
Fri Jun 7 16:17:32 IST 2002
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
More information about the ILUG
mailing list