On Wed, Jul 1, 2009 at 3:57 PM, Joshua Root <[email protected]> wrote:
> On 2009-7-2 07:16, Darren Weber wrote:
> >
> > I need to test if the system has a tar version between 1.14 and 1.14.90,
> > what is the best way to do this in tcl?
>
> Toby has answered your question, but it seems like you'd be better off
> just depending on gnutar rather than messing around doing different
> things for different tar versions.
>
> - Josh
>
Can we assume that a dependency on gnutar will provide either
${prefix}/bin/gnutar or ${prefix}/bin/tar?
To check for gnutar or tar, maybe the following could be used:
if [file exists ${prefix}/bin/gnutar] {
set gnutar ${prefix}/bin/gnutar
} elseif [file exists ${prefix}/bin/tar] {
set gnutar ${prefix}/bin/tar
}
# maybe some kind of confirmation that we get gnutar?
# exec $gnutar --version
To set this variable globally for a Portfile, where is the best place to put
it? Assume the dependency on gnutar requires an installation.
TIA,
Darren
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev