Skip to content
Back to formatted view

Raw Message

Message-ID: <XFMail.041102100326.Ted.Harding@nessie.mcc.ac.uk>
Date: 2004-11-02T11:46:48Z
From: (Ted Harding)
Subject: case-insensitive ZIP
In-Reply-To: <Pine.LNX.4.44.0411020833340.28169-100000@gannet.stats>

On 02-Nov-04 Prof Brian Ripley wrote:
> [...]
> [Analogously, R CMD INSTALL will not install .tgz files on Unix,
> even though some people distribute them: they are (equally) not
> a supported format.]

Hmmm.
Maybe I'm out of date (R 1.8.0) but my Linux /usr/lib/R/bin/INSTALL
has:

      if test -f "${1}"; then
        pkgname=`basename "${1}"`
        ## Also allow for 'package.tgz' ...
        pkgname=`basename "${pkgname}" .tgz`
        pkgname=`echo "${pkgname}" | sed 's/_.*//'`
        ## ...
        gzip -dc "${1}" | (cd "${tmpdir}" && ${TAR} -mxf -)

which looks to me as though it should cope fine with *.tgz as well
as with *.tar.gz, since the 'gzip -dc' doesn't care what the name
"${1}" is, and the ${TAR} is getting the unzipped output on stdin.

And in any case it looks as though 'pkgname' will come out right
whatever follows the first "_." in the tar file name (so long as
the file name is of the form pkgname_.*).

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding@nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861  [NB: New number!]
Date: 02-Nov-04                                       Time: 10:03:26
------------------------------ XFMail ------------------------------