LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] OpenOffice.org Location

[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
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell