Detect BSD Libraries installed in OSX?

Ken Ray kray at sonsothunder.com
Wed Jun 4 15:37:02 EDT 2003


You could use the "there is a folder" construct to determine if the
package exists without using shell():
 
  if there is a folder "/Library/Receipts/BSD.pkg" then answer "BSD
Exists!"
 
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

-----Original Message-----
From: use-revolution-admin at lists.runrev.com
[mailto:use-revolution-admin at lists.runrev.com] On Behalf Of
RGould8 at aol.com
Sent: Wednesday, June 04, 2003 2:56 PM
To: use-revolution at lists.runrev.com
Subject: Re: Detect BSD Libraries installed in OSX?


I'm afraid I'm not getting this at all (which could be due to the fact
that I don't know unix).  I've tried the

# which which

and the 

/usr/bin/which

calls, and all I get is command not found errors.  Can you tell me more
about what the unix command would be to determine if the BSD.pkg file
exists?

In a message dated 6/4/03 12:01:55 AM, alrice at ARCplanning.com writes:




I haven't tested this, but guessing you could check for the existence
of /Library/Receipts/BSD.pkg

However, it would be more robust to check for existence command before
you use shell(). The user could have modified the contents of
/usr/bin/. This might be especially common among users of Fink who
install bunches of stuff into /sw/bin. Maybe they leave /usr/bin alone
and just change their path, or maybe they delete stuff? To be really
robust, use which to locate the command in question:

# which which
/usr/bin/which

Unix is so weird! :-)






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20030604/4c91b44c/attachment.html>


More information about the use-livecode mailing list