1 |
On Tue, 12 Jun 2012 15:26:58 +0200 |
2 |
Michael Weber <xmw@g.o> wrote: |
3 |
|
4 |
> -----BEGIN PGP SIGNED MESSAGE----- |
5 |
> Hash: SHA256 |
6 |
> |
7 |
> - From the eclass: |
8 |
> |
9 |
> # XXX: check whether the directory structure inside is |
10 |
> # fine? i.e. if the tarball has actually a parent dir. |
11 |
> |
12 |
> This should work with gnu and bsd tar, and sed+sort+wc from |
13 |
> sys-apps/coreutils as well as busybox. |
14 |
> |
15 |
> [ $(bsdtar -t -f ~/keithw-mosh-mosh-1.2.1-0-g778b5af.zip \ |
16 |
> | sed 's:/.*::' | sort -u | wc -l) == 1 ] |
17 |
> |
18 |
> I'm totally sure if we have to handle leading slashes and ./ in |
19 |
> obscure tars/zips but I'd say this tests qualifies for an |
20 |
> || ewarn "Please check $f for an single parent directory" |
21 |
> or something like that. |
22 |
|
23 |
Well, I was hoping to come up with something which doesn't involve |
24 |
running additional 'tar -t', to be honest. I have to think about it |
25 |
some more time. |
26 |
|
27 |
-- |
28 |
Best regards, |
29 |
Michał Górny |