/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.355 Revision 1.356
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
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.355 2011/03/18 20:36:37 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.356 2011/04/18 15:09:16 vapier Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
1391 dd) exe="dd ibs=${skip} skip=1 if='${src}'";; 1391 dd) exe="dd ibs=${skip} skip=1 if='${src}'";;
1392 *) die "makeself cant handle exe '${exe}'" 1392 *) die "makeself cant handle exe '${exe}'"
1393 esac 1393 esac
1394 1394
1395 # lets grab the first few bytes of the file to figure out what kind of archive it is 1395 # lets grab the first few bytes of the file to figure out what kind of archive it is
1396 local tmpfile=$(emktemp) 1396 local filetype tmpfile=$(emktemp)
1397 eval ${exe} 2>/dev/null | head -c 512 > "${tmpfile}" 1397 eval ${exe} 2>/dev/null | head -c 512 > "${tmpfile}"
1398 local filetype=$(file -b "${tmpfile}") 1398 filetype=$(file -b "${tmpfile}") || die
1399 case ${filetype} in 1399 case ${filetype} in
1400 *tar\ archive*) 1400 *tar\ archive*)
1401 eval ${exe} | tar --no-same-owner -xf - 1401 eval ${exe} | tar --no-same-owner -xf -
1402 ;; 1402 ;;
1403 bzip2*) 1403 bzip2*)

Legend:
Removed from v.1.355  
changed lines
  Added in v.1.356

  ViewVC Help
Powered by ViewVC 1.1.20