1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA256 |
3 |
|
4 |
- From the eclass: |
5 |
|
6 |
# XXX: check whether the directory structure inside is |
7 |
# fine? i.e. if the tarball has actually a parent dir. |
8 |
|
9 |
This should work with gnu and bsd tar, and sed+sort+wc from |
10 |
sys-apps/coreutils as well as busybox. |
11 |
|
12 |
[ $(bsdtar -t -f ~/keithw-mosh-mosh-1.2.1-0-g778b5af.zip \ |
13 |
| sed 's:/.*::' | sort -u | wc -l) == 1 ] |
14 |
|
15 |
I'm totally sure if we have to handle leading slashes and ./ in |
16 |
obscure tars/zips but I'd say this tests qualifies for an |
17 |
|| ewarn "Please check $f for an single parent directory" |
18 |
or something like that. |
19 |
|
20 |
My 2 cents |
21 |
|
22 |
- -- |
23 |
Gentoo Dev |
24 |
http://xmw.de/ |
25 |
|
26 |
|
27 |
-----BEGIN PGP SIGNATURE----- |
28 |
Version: GnuPG v2.0.17 (GNU/Linux) |
29 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ |
30 |
|
31 |
iF4EAREIAAYFAk/XQ6IACgkQknrdDGLu8JCXrQD/esMpA3z4jiZIsI3qkiz3zM7X |
32 |
0I2ck7tG6WHGqTP/HEQA/jCAxkDt2hUXM+govuZaKrNHj5pBNvJIQNUF7VnzYKYr |
33 |
=Lf4O |
34 |
-----END PGP SIGNATURE----- |