| 1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.45 2003/07/18 20:43:00 wolf31o2 Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.46 2003/07/22 18:42:59 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Martin Schlemmer <azarah@gentoo.org> |
5 | # Author: Martin Schlemmer <azarah@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # This eclass is for general purpose functions that most ebuilds |
7 | # This eclass is for general purpose functions that most ebuilds |
| 8 | # have to implement themselves. |
8 | # have to implement themselves. |
| … | |
… | |
| 871 | debug-print "Detected Makeself version ${ver} ... using ${skip} as offset" |
871 | debug-print "Detected Makeself version ${ver} ... using ${skip} as offset" |
| 872 | fi |
872 | fi |
| 873 | |
873 | |
| 874 | # we do this because otherwise a failure in gzip will cause 0 bytes to be sent |
874 | # we do this because otherwise a failure in gzip will cause 0 bytes to be sent |
| 875 | # to tar which will make tar not extract anything and exit with 0 |
875 | # to tar which will make tar not extract anything and exit with 0 |
| 876 | local out="`tail +${skip} ${src} | gzip -cd | tar -x --no-same-owner -v -f -`" |
876 | local out="`(tail +${skip} ${src} | gzip -cd | tar -x --no-same-owner -f -) 2>&1`" |
|
|
877 | if [ ! -z "${out}" ] ; then |
|
|
878 | # maybe it isnt gzipped ... they usually are, but not always ... |
|
|
879 | tail +${skip} ${src} | tar -x --no-same-owner -f - \ |
| 877 | [ -z "${out}" ] && die "failure unpacking makeself ${shrtsrc} ('${ver}' +${skip})" |
880 | || die "failure unpacking makeself ${shrtsrc} ('${ver}' +${skip})" |
|
|
881 | fi |
| 878 | } |
882 | } |