Title: Message
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: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:56 PM
To: [EMAIL PROTECTED]
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, [EMAIL PROTECTED] 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! :-)


Reply via email to