configure's tar ustar test can fail on Solaris
dshaw at jabberwocky.com
Wed Jul 12 16:04:57 CEST 2006
On Wed, Jul 12, 2006 at 06:47:52AM -0600, Nelson H. F. Beebe wrote:
> David Shaw comments today:
> >> ...
> >> The thing is, the 'ustar' string is always at the same byte offset in
> >> the file. I'm wondering if "head -c 262 | tail -c 5" would do it, or
> >> some sed or awk magic...
> >> ...
> Neither sed nor awk can handle binary files; gawk can, but may not be
> universally available.
> The tool you want is venerable dd: this works back to at least Unix
> version V7:
> $ dd skip=257 bs=1 count=5 if=foo.tar 2>/dev/null | grep ustar
Excellent suggestion. Here's what I have now:
$_mytar -cf - conftest.txt | (dd skip=257 bs=1 count=5 2>/dev/null || cat) | grep ustar > /dev/null
More information about the Gnupg-devel