Gentoo Archives: gentoo-dev

From: Markos Chandras <hwoarang@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Cc: azamat.hackimov@×××××.com
Subject: Re: [gentoo-dev] [RFC] unpacker.eclass extensions
Date: Sat, 15 Jun 2013 14:33:59
Message-Id: CAG2jQ8hUikc895RjB3Y__6KgQATVGC7YmtO1Uhe4rc-QX+QF0w@mail.gmail.com
In Reply to: [gentoo-dev] [RFC] unpacker.eclass extensions by "Vadim A. Misbakh-Soloviov"
1 Hi Vadim,
2
3 On 15 June 2013 09:39, Vadim A. Misbakh-Soloviov <mva@×××.name> wrote:
4 > # Make sure that file exists
5 > [[ -f "./$i" ]] && (
6 > local type=$(file -b ${i})
7 > case ${type} in
8 > data)
9 > tar -xJf "./$i"
10 > ;;
11 > gzip*)
12 > tar -xzf "./$i"
13 > ;;
14 > esac
15 > ) || die "Failed to unpack $i"
16 > done
17 > }
18 >
19 I have a couple of questions. Why sub-shell here? My understanding is
20 that first you need to make sure the
21 file exists and then unpack it. Also || die does not work in subshells.
22
23 http://devmanual.gentoo.org/ebuild-writing/error-handling/index.html
24
25 > 2) It'd be also nice to detect mojo installers (most of the time,
26 > they're "*-bin" or "*Installer" ELF32 sfx-archives) and pass them to
27 > unpack_zip by default.
28 > Unfortunately, I've no free time ATM, but if it is needed, I can write
29 > prototype for Mojo unpacking.
30 >
31
32 We can only merge what you show us for review :)
33
34 --
35 Regards,
36 Markos Chandras - Gentoo Linux Developer
37 http://dev.gentoo.org/~hwoarang

Replies

Subject Author
Re: [gentoo-dev] [RFC] unpacker.eclass extensions Markos Chandras <hwoarang@g.o>