39 lines
1.8 KiB
Text
39 lines
1.8 KiB
Text
|
Force use of GNU tar, and adapt gzip parser to OpenBSD gzip
|
||
|
|
||
|
Index: scripts/miscellaneous/unpack.m
|
||
|
--- scripts/miscellaneous/unpack.m.orig
|
||
|
+++ scripts/miscellaneous/unpack.m
|
||
|
@@ -200,15 +200,15 @@ function filelist = unpack (file, dir = [], filetype =
|
||
|
'bzip2 -d -k -f "%s"', ...
|
||
|
@__parse_bzip2__, true};
|
||
|
commandlist.bz = commandlist.bz2;
|
||
|
- commandlist.tar = {'tar xvf "%s"', ...
|
||
|
- 'tar xf "%s"', ...
|
||
|
+ commandlist.tar = {'gtar xvf "%s"', ...
|
||
|
+ 'gtar xf "%s"', ...
|
||
|
@__parse_tar__, false};
|
||
|
- commandlist.targz = {'gzip -d -c "%s" | tar xvf -', ...
|
||
|
- 'gzip -d -c "%s" | tar xf -', ...
|
||
|
+ commandlist.targz = {'gzip -d -c "%s" | gtar xvf -', ...
|
||
|
+ 'gzip -d -c "%s" | gtar xf -', ...
|
||
|
@__parse_tar__, false};
|
||
|
commandlist.tgz = commandlist.targz;
|
||
|
- commandlist.tarbz2 = {'bzip2 -d -c "%s" | tar xvf -', ...
|
||
|
- 'bzip2 -d -c "%s" | tar xf -', ...
|
||
|
+ commandlist.tarbz2 = {'bzip2 -d -c "%s" | gtar xvf -', ...
|
||
|
+ 'bzip2 -d -c "%s" | gtar xf -', ...
|
||
|
@__parse_tar__, false};
|
||
|
commandlist.tarbz = commandlist.tarbz2;
|
||
|
commandlist.tbz2 = commandlist.tarbz2;
|
||
|
@@ -332,7 +332,9 @@ function files = __parse_gzip__ (output)
|
||
|
## Parse the output from gzip and gunzip returning the files
|
||
|
## compressed (or decompressed).
|
||
|
|
||
|
- files = regexprep (output, '^.+ -- (?:created|replaced with) (.*)$', '$1');
|
||
|
+ tmp = regexprep (output, '^.+ -- (?:created|replaced with) (.*)$', '$1');
|
||
|
+ files = regexprep (tmp, "([0-9]+ bytes in, [0-9]+ bytes out$)", '');
|
||
|
+ files(strcmp('',files))=[];
|
||
|
endfunction
|
||
|
|
||
|
function files = __parse_bzip2__ (output)
|