On Sat, Feb 26, 2000 at 12:03:26AM -0300, Nicolás Lichtmaier wrote:
> > Yeah, it assumes I could actually code to save my life. And that I really
> > need readlink.
>
> You can replace readlink with this function. I have created it for `bug'
> when I discovered that realpath isn't standard (as it should).
And here's the implementation I've been using for a very long time with the
X maintainer scripts, which is simpler than yours but requires perl. (I
think Joey Hess wrote this.)
readlink () {
# perl kludge until readlink(1) from tetex-bin is moved into an essential package
# returns what symlink actually points to
perl -e '$l = shift; exit 1 unless -l $l; $r = readlink $l; exit 1 unless $r; print "$r\n"' $1;
}
Not sure we want libc6 pre-depending on perl, though ( >>shudder<< ), so
something written in pure sh might be the way to go.
--
G. Branden Robinson |
Debian GNU/Linux | The software said it required Windows
branden@ecn.purdue.edu | 3.1 or better, so I installed Linux.
roger.ecn.purdue.edu/~branden/ |
Attachment:
pgpT0eyt7NVTb.pgp
Description: PGP signature