-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 06/12/2012 04:46 PM, Michał Górny wrote:
> Well, I was hoping to come up with something which doesn't involve 
> running additional 'tar -t', to be honest. I have to think about
> it some more time.
> 

FTR,

filelist=$(tar xvC /tmp/xxx --strip-components 1 \
        -f ~/keithw-mosh-mosh-1.2.1-0-g778b5af.tar.gz 2>&1) || die

[ $(echo $filelist | sed 's:/.*::' | sort -u | wc -l) == 1 ] \
        || ewarn "..."

does work with GNU tar, but not with bsdtar, which displays the
stripped filenames, plus an leading "x ".

Michael

- --
Gentoo Dev
http://xmw.de/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAk/XrOwACgkQknrdDGLu8JCbwwD+InGUaLTki1W6gYwy+O2zAEek
peIoy1cjDig3EWqRtacA/RVFf3P5y8MBRKaE7yeyzypTUomvXq6tWqVZSUywnjYL
=3Zw6
-----END PGP SIGNATURE-----

Reply via email to