bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rln, a potential new core util


From: Eric Blake
Subject: Re: rln, a potential new core util
Date: Thu, 23 Feb 2006 05:58:29 -0700
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to David Laurence Emerson on 2/21/2006 4:02 AM:
> Hey all you wonderful GNU folks,
> 
> I've written a utility that may be appropriate for future inclusion in the 
> gnu 
> core utils.  It assists in the creation of relative-path symlinks, enabling 
> tab-completion in a number of cases where that fails for ln -s, and 
> preventing the creation of dead links.
> 
> For now, the tool is called "rln" ("r" is for relative).  I have attached the 
> decently-commented bash source for your amusement!  It seems to work pretty 
> well, though admittedly a c implementation would be much better.  For 
> convenience, I gave it a .txt extention and removed #!/bin/bash from the top 
> (so email clients will treat it as plain text).

Rather than a new utility, have you considered adding a new command-line
option to the existing ln that gives the same semantics?  Something like:

$ ln --help
...
   --make-relative  implies -s, creates relative symlinks in
                    DIRECTORY pointing to existing TARGETs
...
$ cd /a/b/c/d/e
$ ln -v --make-relative E2 E4 E6 /a
create relative symbolic link `/a/E2' to `E2'
create relative symbolic link `/a/E4' to `E4'
create relative symbolic link `/a/E6' to `E6'
$ for f in /a/E? ; do echo -n "$f: "; readlink $f ; done
/a/E2: b/c/d/e/E2
/a/E4: b/c/d/e/E4
/a/E6: b/c/d/e/E6
$

Even so, I'm not sure this will be accepted as part of coreutils without a
patch to the C implementation of ln, lots of good documentation, and test
cases; and even then, without a good argument why this extension is essential.

> 
> It would be fun to continue development of this tool and rewrite it in c, but 
> the truth is that I've already fulfilled my personal need for the tool.  
> However, if you folks at gnu think it might be useful to others, I would love 
> to continue work on this project, which would be my first c contribution to 
> the community.  In case it's of any relevance, I'd be happy to release it
> under any version of the GPL, and/or simply donate it to the FSF.

Unfortunately, due to legal technicalities, an email disclaimer does not
qualify; if you actually contributed a patch, you would have to fill out
and snail mail paperwork to the FSF offices.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD/bF184KuGfSFAYARAmEmAJ9jQisJmMtQ8kPKgmyHRsB7AFoV5gCgiXx1
dL2Qc4Hv5aN3L9fifCYvEk0=
=VJwa
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]