[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: command for relative path
From: |
Dmitry V. Levin |
Subject: |
Re: command for relative path |
Date: |
Mon, 14 Nov 2011 02:57:26 +0400 |
On Sun, Nov 13, 2011 at 04:41:14PM -0600, Peng Yu wrote:
> On Sun, Nov 13, 2011 at 12:45 PM, Dmitry V. Levin wrote:
> > On Sat, Nov 12, 2011 at 11:45:56AM -0700, Eric Blake wrote:
> > [...]
> >> http://docs.python.org/library/os.path.html
> >> >> os.path.relpath(path[, start])
> >> >>
> >> >> Return a relative filepath to path either from the current
> >> >> directory or from an optional start point.
> >>
> >> Ah, so the idea is that python has a function that computes a relative
> >> pathname to one path given a starting point:
> >>
> >> $ relpath /usr/bin /tmp
> >> ../usr/bin
> >> $ relpath /usr/bin /usr/share
> >> ../bin
> >
> > Btw, there is an utility in freebsd ports called relpath:
>
> This is good to know.
>
> Just to double check. Due to the license for the FreeBSD's relpath, it
> can not be copied to coreutils. Right?
First, it is not FreeBSD's relpath, it's relpath from FreeBSD ports.
Second, even if the license and copyright terms would be acceptable,
the code quality of that relpath.c is certainly not.
However, that utility seems to be in use for a long time yet, so it might
be reasonable to reuse its name and usage interface (I'm not sure about -d
option, though).
--
ldv
pgpenUYQsF0h6.pgp
Description: PGP signature
Re: command for relative path, Peng Yu, 2011/11/13
- Re: command for relative path, Bob Proulx, 2011/11/14
- Re: command for relative path, Jim Meyering, 2011/11/14
- Re: command for relative path, Peng Yu, 2011/11/14
- Re: command for relative path, Pádraig Brady, 2011/11/14
- Re: command for relative path, Peng Yu, 2011/11/14