[ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-02-14 Thread Bernhard Walle
ptxdist heavily uses "readlink -f" which only works with GNU readlink. So add the usual check here. However, because "readlink -f" is also used before the symlinks in the ptxdist directory is added to the PATH, that "readlink -f" call is replaced by a bash-only implementation. This one is copied f

[ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-03-13 Thread bernhard
From: Bernhard Walle ptxdist heavily uses "readlink -f" which only works with GNU readlink. So add the usual check here. However, because "readlink -f" is also used before the symlinks in the ptxdist directory is added to the PATH, that "readlink -f" call is replaced by a bash-only implementatio

[ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-03-13 Thread bernhard
From: Bernhard Walle ptxdist heavily uses "readlink -f" which only works with GNU readlink. So add the usual check here. However, because "readlink -f" is also used before the symlinks in the ptxdist directory is added to the PATH, that "readlink -f" call is replaced by a bash-only implementatio

Re: [ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-02-14 Thread Michael Olbrich
On Tue, Feb 14, 2012 at 09:55:47PM +0100, Bernhard Walle wrote: > ptxdist heavily uses "readlink -f" which only works with GNU readlink. > So add the usual check here. > > However, because "readlink -f" is also used before the symlinks in the > ptxdist directory is added to the PATH, that "readlin

Re: [ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-03-12 Thread Bernhard Walle
Hi Michael, thanks again for the review. * Michael Olbrich [2012-02-14 23:05]: > > +# bash implementation of realpath / readlink -f > > +# arg1 - filename > > +realpath() > > +{ > > + local fname oldfname > > + > > hmmm, scary. What's wrong about 'local'? > Another idea: Is the problem th

Re: [ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-03-13 Thread Michael Olbrich
On Mon, Mar 12, 2012 at 08:56:17PM +0100, Bernhard Walle wrote: > Hi Michael, > > thanks again for the review. > > * Michael Olbrich [2012-02-14 23:05]: > > > +# bash implementation of realpath / readlink -f > > > +# arg1 - filename > > > +realpath() > > > +{ > > > + local fname oldfname > > >

Re: [ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-03-13 Thread Bernhard Walle
* Michael Olbrich [2012-03-13 11:14]: > > Not the 'local', the whole function. Getting all corner-cases right for > something like this is not trivial. Ah, ok. Indeed. That's why I started using something from the Internet[tm] and that's also why I only replaced that initial "readlink -f" call t

Re: [ptxdist] [PATCH] ptxdist: Check for GNU readlink

2012-03-13 Thread Michael Olbrich
On Tue, Mar 13, 2012 at 12:30:23PM +0100, bernh...@bwalle.de wrote: > From: Bernhard Walle > > ptxdist heavily uses "readlink -f" which only works with GNU readlink. > So add the usual check here. > > However, because "readlink -f" is also used before the symlinks in the > ptxdist directory is a