[Vm-dev] search order for plugins
Bert Freudenberg
bert at freudenbergs.de
Mon Apr 30 16:43:49 UTC 2007
On Apr 30, 2007, at 12:17 , Ian Piumarta wrote:
> On Apr 30, 2007, at 3:08 AM, subbukk wrote:
>
>> For scripts, it does pathname expansion, opens the file to detect
>> shebang
>> interpreter and then passes the fullpath as $0 to the interp.
>> Therefore, $0
>> in a shell script will contain the full pathname.
>
> I've tried this on many different shells and it appears to be
> reliable only if there are no dirnames in the command. Typing a
> relative path to the script breaks it. However, it's nothing that
> a call to realpath() can't cure so here's what I propose to do,
> unless someone else can think of a reason not to:
>
> 1. Remove ./ from the list of places searched.
> 2. Merge SQUEAK_PLUGINS and SQUEAK_PLUGIN_PATH into one.
> 3. Fix any relative paths in SQUEAK_PLUGIN_PATH via realpath().
> 4. Make SQUEAK_PLUGIN_PATH be the first place searched.
>
> This would give you what you're asking for (use the -plugins
> option) with the smallest change to the behaviour of the binary.
Sounds good to me.
- Bert -
More information about the Squeak-dev
mailing list
|