From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65345 invoked by alias); 22 Oct 2017 18:31:01 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 64782 invoked by uid 89); 22 Oct 2017 18:31:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=U*$, HContent-Transfer-Encoding:8bit X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 22 Oct 2017 18:30:59 +0000 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1e6L1U-00017O-PB; Sun, 22 Oct 2017 20:30:56 +0200 Received: from 70-36-239-2.dsl.dynamic.fusionbroadband.com ([70.36.239.2] helo=localhost.localdomain) by mailfront10.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1e6L1J-0000sL-7L; Sun, 22 Oct 2017 20:30:45 +0200 Subject: Re: symlink problems with mac os To: =?UTF-8?Q?Bj=c3=b6rn_Raupach?= Cc: "kawa@sourceware.org" References: <7DC458EC-78C0-40B3-871F-5B0E72E43CF5@e2n.de> <0cfce2d5-3e68-bf23-95c6-f6fc6e717f99@bothner.com> <9a15e187-6123-2c5a-181b-e4ebb9ac0dc8@bothner.com> <9DD66D7B-E0BE-441F-BD51-3F255A505F00@e2n.de> From: Per Bothner Message-ID: Date: Sun, 22 Oct 2017 18:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <9DD66D7B-E0BE-441F-BD51-3F255A505F00@e2n.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-q4/txt/msg00015.txt.bz2 On 10/22/2017 11:15 AM, Björn Raupach wrote: >> On 22. Oct 2017, at 19:40, Per Bothner 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/