summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-11-15 21:48:37 +0000
committerMike Frysinger <vapier@gentoo.org>2003-11-15 21:48:37 +0000
commit551139f0dc717f1463cc310d5799faf66d92142c (patch)
tree87fe8e21f212e23fc7e8f0d21f055053ed8673cf /eclass/eutils.eclass
parenthppa needs pic (diff)
downloadgentoo-2-551139f0dc717f1463cc310d5799faf66d92142c.tar.gz
gentoo-2-551139f0dc717f1463cc310d5799faf66d92142c.tar.bz2
gentoo-2-551139f0dc717f1463cc310d5799faf66d92142c.zip
bzip2 support in makeself files
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass15
1 files changed, 12 insertions, 3 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 26c8674ecacc..03ca5a539269 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.65 2003/11/10 22:18:04 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.66 2003/11/15 21:48:37 vapier Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -974,8 +974,17 @@ unpack_makeself() {
if [ "${pipestatus//0}" != "" ]
then
# maybe it isnt gzipped ... they usually are, but not always ...
- tail -n +${skip} ${src} | tar -x --no-same-owner -f - \
- || die "failure unpacking makeself ${shrtsrc} ('${ver}' +${skip})"
+ tail -n +${skip} ${src} 2>/dev/null \
+ | tar -x --no-same-owner -f - 2>/dev/null
+ pipestatus="${pipestatus// }"
+ if [ "${pipestatus//0}" != "" ]
+ then
+ # and every once in a while they are bzipped2 ...
+ tail -n +${skip} ${src} 2>/dev/null \
+ | bunzip2 -c 2>/dev/null \
+ | tar -x --no-same-owner -f - 2>/dev/null \
+ || die "failure unpacking makeself ${shrtsrc} ('${ver}' +${skip})"
+ fi
fi
}