Re: [Rd] Re: [R] case-insensitive ZIP

From: Ted Harding <>
Date: Tue 02 Nov 2004 - 20:03:26 EST

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.]

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,

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

______________________________________________ mailing list Received on Tue Nov 02 21:59:00 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:00:59 EST