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

Diff of /eclass/unpacker.eclass

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

Revision 1.2 Revision 1.4
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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/unpacker.eclass,v 1.2 2012/02/05 05:48:00 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/unpacker.eclass,v 1.4 2012/02/05 06:30:10 vapier Exp $
4 4
5# @ECLASS: unpacker.eclass 5# @ECLASS: unpacker.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: helpers for extraneous file formats and consistent behavior across EAPIs 8# @BLURB: helpers for extraneous file formats and consistent behavior across EAPIs
194 ;; 194 ;;
195 2.1.3) 195 2.1.3)
196 skip=`grep -a ^offset= "${src}" | awk '{print $3}'` 196 skip=`grep -a ^offset= "${src}" | awk '{print $3}'`
197 (( skip++ )) 197 (( skip++ ))
198 ;; 198 ;;
199 2.1.4|2.1.5) 199 2.1.4|2.1.5|2.1.6)
200 skip=$(grep -a offset=.*head.*wc "${src}" | awk '{print $3}' | head -n 1) 200 skip=$(grep -a offset=.*head.*wc "${src}" | awk '{print $3}' | head -n 1)
201 skip=$(head -n ${skip} "${src}" | wc -c) 201 skip=$(head -n ${skip} "${src}" | wc -c)
202 exe="dd" 202 exe="dd"
203 ;; 203 ;;
204 *) 204 *)
296 *) arch="" ;; 296 *) arch="" ;;
297 esac 297 esac
298 298
299 # finally do the unpack 299 # finally do the unpack
300 if [[ -z ${arch}${comp} ]] ; then 300 if [[ -z ${arch}${comp} ]] ; then
301 unpack "${a}" 301 unpack "$1"
302 return $? 302 return $?
303 fi 303 fi
304 304
305 [[ ${arch} != unpack_* ]] && unpack_banner "${a}" 305 [[ ${arch} != unpack_* ]] && unpack_banner "${a}"
306 306

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20