extract gzip files

Mark Brethen mark.brethen at gmail.com
Fri Nov 30 17:09:56 UTC 2018


This doesn’t work:

    extract.suffix    = .gz
    extract.cmd       = gunzip
    extract.pre_args  = -c
    extract.post_args = "> ${workpath}"

so, I’m using this:

    extract {
        foreach f ${distfiles} {
            set stem [file rootname [file tail ${f}]]
            system -W ${distpath} "gunzip -c ${f} > ${workpath}/${stem}"
        }
    }

have to provide the extracted filename.

Mark Brethen
mark.brethen at gmail.com



> On Nov 30, 2018, at 8:43 AM, Mark Brethen <mark.brethen at gmail.com> wrote:
> 
> I can override the extract phase and use a foreach block with something like this:
> 
> STEM=$(basename "${f}" .gz)
>  gzip -c "${f}” >${extract_dir}/"${STEM}”
> 
> 
> Mark Brethen
> mark.brethen at gmail.com
> 
> 
> 
>> On Nov 30, 2018, at 8:13 AM, Mark Brethen <mark.brethen at gmail.com> wrote:
>> 
>> For *.gz files (no tar), what’s the proper way to extract them to extract_dir? 
>> 
>> 
>> 
>> 
>> Mark Brethen
>> mark.brethen at gmail.com
>> 
>> 
>> 
> 



More information about the macports-dev mailing list