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

Diff of /eclass/prefix.eclass

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

Revision 1.2 Revision 1.3
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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# $Id: prefix.eclass,v 1.2 2009/11/16 21:37:14 grobian Exp $ 3# $Id: prefix.eclass,v 1.3 2009/11/16 21:39:00 grobian Exp $
4 4
5# @ECLASS: prefix.eclass 5# @ECLASS: prefix.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Feel free to contact the Prefix team through <prefix@gentoo.org> if 7# Feel free to contact the Prefix team through <prefix@gentoo.org> if
8# you have problems, suggestions or questions. 8# you have problems, suggestions or questions.
31# dies if no arguments are given, a file does not exist, or changing a 31# dies if no arguments are given, a file does not exist, or changing a
32# file failed. 32# file failed.
33eprefixify() { 33eprefixify() {
34 [[ $# -lt 1 ]] && die "at least one argument required" 34 [[ $# -lt 1 ]] && die "at least one argument required"
35 35
36 einfo "Adjusting to prefix ${EPREFIX:-/}" \ 36 einfo "Adjusting to prefix ${EPREFIX:-/}"
37 local x 37 local x
38 for x in "$@" ; do 38 for x in "$@" ; do
39 if [[ -e ${x} ]] ; then 39 if [[ -e ${x} ]] ; then
40 ebegin " ${x##*/}" 40 ebegin " ${x##*/}"
41 sed -i -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" "${x}" 41 sed -i -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" "${x}"

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

  ViewVC Help
Powered by ViewVC 1.1.20