• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fink and 'sh'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fink and 'sh'


  • Subject: Re: Fink and 'sh'
  • From: Nigel Smith <email@hidden>
  • Date: Tue, 23 Mar 2004 10:52:53 +0000

On 22/3/04 21:17, "Graff" <email@hidden> wrote:

> Of course, as someone already said, this solution depends on the
> "where" command being able to find the "lame" command.

Another way would be to use "locate" instead (watch for the line breaks):

------------
set thePath to {}
repeat with everyParagraph in paragraphs of (do shell script "locate /lame")
if everyParagraph ends with "/lame" then set end of thePath <no-break>
to contents of everyParagraph
end repeat
if (count of thePath) = 0 then
display dialog "lame not installed"
else if (count of thePath) = 1 then
display dialog "lame is installed in " & item 1 of thePath
else
set thePath to choose from list thePath with prompt <no-break>
"zless is installed in more than one location -- <no-break>
pick a version to use" without multiple selections allowed
display dialog "lame is installed in " & item 1 of thePath
end if
------------

Though that depends on the locate database being up to date.

Nigel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Fink and 'sh' (From: Graff <email@hidden>)

  • Prev by Date: Re: Unicode text and class URL
  • Next by Date: Re: how to empty clipboard contents?
  • Previous by thread: Re: Fink and 'sh'
  • Next by thread: Re: Fink and 'sh'
  • Index(es):
    • Date
    • Thread