Hi Vadim, On 15 June 2013 09:39, Vadim A. Misbakh-Soloviov <m...@mva.name> wrote: > # Make sure that file exists > [[ -f "./$i" ]] && ( > local type=$(file -b ${i}) > case ${type} in > data) > tar -xJf "./$i" > ;; > gzip*) > tar -xzf "./$i" > ;; > esac > ) || die "Failed to unpack $i" > done > } > I have a couple of questions. Why sub-shell here? My understanding is that first you need to make sure the file exists and then unpack it. Also || die does not work in subshells.
http://devmanual.gentoo.org/ebuild-writing/error-handling/index.html > 2) It'd be also nice to detect mojo installers (most of the time, > they're "*-bin" or "*Installer" ELF32 sfx-archives) and pass them to > unpack_zip by default. > Unfortunately, I've no free time ATM, but if it is needed, I can write > prototype for Mojo unpacking. > We can only merge what you show us for review :) -- Regards, Markos Chandras - Gentoo Linux Developer http://dev.gentoo.org/~hwoarang