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

Diff of /eclass/eutils.eclass

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

Revision 1.211 Revision 1.212
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.211 2005/10/21 18:24:23 wolf31o2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.212 2005/10/22 02:32:48 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.
1010 local sizeoff_t=$2 1010 local sizeoff_t=$2
1011 1011
1012 [[ -z ${src} ]] && die "Could not locate source for '$1'" 1012 [[ -z ${src} ]] && die "Could not locate source for '$1'"
1013 [[ -z ${sizeoff_t} ]] && die "No idea what off_t size was used for this pdv :(" 1013 [[ -z ${sizeoff_t} ]] && die "No idea what off_t size was used for this pdv :("
1014 1014
1015 local shrtsrc="`basename ${src}`" 1015 local shrtsrc=$(basename "${src}")
1016 echo ">>> Unpacking ${shrtsrc} to ${PWD}" 1016 echo ">>> Unpacking ${shrtsrc} to ${PWD}"
1017 local metaskip=`tail -c ${sizeoff_t} ${src} | hexdump -e \"%i\"` 1017 local metaskip=`tail -c ${sizeoff_t} ${src} | hexdump -e \"%i\"`
1018 local tailskip=`tail -c $((${sizeoff_t}*2)) ${src} | head -c ${sizeoff_t} | hexdump -e \"%i\"` 1018 local tailskip=`tail -c $((${sizeoff_t}*2)) ${src} | head -c ${sizeoff_t} | hexdump -e \"%i\"`
1019 1019
1020 # grab metadata for debug reasons 1020 # grab metadata for debug reasons
1092 1092
1093 [[ -z ${src} ]] && die "Could not locate source for '$1'" 1093 [[ -z ${src} ]] && die "Could not locate source for '$1'"
1094 1094
1095 local shrtsrc=$(basename "${src}") 1095 local shrtsrc=$(basename "${src}")
1096 echo ">>> Unpacking ${shrtsrc} to ${PWD}" 1096 echo ">>> Unpacking ${shrtsrc} to ${PWD}"
1097 if [ -z "${skip}" ] 1097 if [[ -z ${skip} ]] ; then
1098 then
1099 local ver="`grep -a '#.*Makeself' ${src} | awk '{print $NF}'`" 1098 local ver=$(grep -a '#.*Makeself' "${src}" | awk '{print $NF}')
1100 local skip=0 1099 local skip=0
1101 exe=tail 1100 exe=tail
1102 case ${ver} in 1101 case ${ver} in
1103 1.5.*) # tested 1.5.{3,4,5} ... guessing 1.5.x series is same 1102 1.5.*) # tested 1.5.{3,4,5} ... guessing 1.5.x series is same
1104 skip=$(grep -a ^skip= "${src}" | cut -d= -f2) 1103 skip=$(grep -a ^skip= "${src}" | cut -d= -f2)

Legend:
Removed from v.1.211  
changed lines
  Added in v.1.212

  ViewVC Help
Powered by ViewVC 1.1.20