Re: Fink and 'sh'
Re: Fink and 'sh'
- Subject: Re: Fink and 'sh'
- From: Brennan <email@hidden>
- Date: Mon, 22 Mar 2004 22:50:44 +0100
On 22/3/04 at 16: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. The problem is
>
that the "where" command looks at your PATH, which is not set properly
>
in the first place. This means that it won't find "lame" so it is kind
>
of circular in this case. I didn't think of this when I first posted
>
my answer.
Hmm. I don't really understand this. What do you mean when you say that
PATH is not set properly? I understand that PATH is an environment
variable, presumably a list of places where to look for commands. However,
do shell script "/bin/tcsh -c 'where lame"
*does* return the path to LAME. It does the right thing already. Do I
still have to worry about PATH?
Although... I first installed LAME with the package from
<
http://www.culater.net> but afterwards the Terminal didn't know it by
name. Only after I installed it with Fink, was I able to run it from the
terminal by name only. Is that relevant?
>
The new answer? Either:
>
1. assume that "lame" is in a certain location such as /sw/bin/lame and
>
do a simple check for it there before you try to run it
Yes, I suppose I should accept that 90% of users that install lame under
OSX will use Fink, or some other installer that puts it in /sw/bin/ so
it's a reasonable assumption - especially if the script checks the default
location, and then maybe does a 'find' or something.
>
or
>
2. save the script as an application bundle and put lame inside the
>
bundle. Put it into /path/to/yourapp.app/Contents/Resources/ and then
>
use a relative path to it:
This is quite ingenious. It's taken me a while to appreciate how powerful
bundles are. Now I am seeing uses for them at every turn.
Brennan
_______________________________________________
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.