symlink problems with mac os
Per Bothner
per@bothner.com
Sun Oct 22 18:31:00 GMT 2017
On 10/22/2017 11:15 AM, Björn Raupach wrote:
>> On 22. Oct 2017, at 19:40, Per Bothner <per@bothner.com> wrote:
>>> The reason for the readlink to handle the case that you install kawa
>>> as a symlink for example /usr/local/bin/kawa -> /opt/kawa-3.0/bin/kawa .
>>> I think that is useful to support - and it doesn't work without the -f.
>>
>> On second though that use-case can be handled just as well with creating
>> an executable file /usr/local/bin/kawa containing:
>>
>> exec /opt/kawa-3.0/bin/kawa "$@â
>
> Not sure about this. Probably wouldnât help my case. What if I donât install in /opt/kawa-3.0?
That is just an example. I'm talking about either
(a) building from source (and then running in-place without doing 'make install') or
(b) unzip the binary distribution in some directory - for example /opt/kawa-3.0.
After that you might want to put 'kawa' in your PATH. Instead if adding another entry
to your PATH variable, you can either:
(1) create a 'kawa' symlink from a directory in your PATH to (for example)
/opt/kawa-3.0/bin/kawa, or
(2) create a small shell file containing 'exec /opt/kawa-3.0/bin/kawa "$@â'
in a directory in your path.
Option (1) requires 'readlink -f' to work - but option (2) doesn't.
(Assuming I fix thing so $builddir/bin/kawa is no longer a symlink.)
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Kawa
mailing list