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

Diff of /eclass/eutils.eclass

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

Revision 1.225 Revision 1.226
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.225 2006/02/18 10:50:10 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.226 2006/02/20 11:56:33 flameeyes 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.
1436# directories and uses the union of the lists. 1436# directories and uses the union of the lists.
1437strip-linguas() { 1437strip-linguas() {
1438 local ls newls 1438 local ls newls
1439 if [[ $1 == "-i" ]] || [[ $1 == "-u" ]] ; then 1439 if [[ $1 == "-i" ]] || [[ $1 == "-u" ]] ; then
1440 local op=$1; shift 1440 local op=$1; shift
1441 ls=" $(find "$1" -name '*.po' -printf '%f ') "; shift 1441 ls=" $(find "$1" -name '*.po' -exec basename {} \;) "; shift
1442 local d f 1442 local d f
1443 for d in "$@" ; do 1443 for d in "$@" ; do
1444 if [[ ${op} == "-u" ]] ; then 1444 if [[ ${op} == "-u" ]] ; then
1445 newls=${ls} 1445 newls=${ls}
1446 else 1446 else
1447 newls="" 1447 newls=""
1448 fi 1448 fi
1449 for f in $(find "$d" -name '*.po' -printf '%f ') ; do 1449 for f in $(find "$d" -name '*.po' -exec basename {} \;) ; do
1450 if [[ ${op} == "-i" ]] ; then 1450 if [[ ${op} == "-i" ]] ; then
1451 [[ ${ls/ ${f} /} != ${ls} ]] && newls="${newls} ${f}" 1451 [[ ${ls/ ${f} /} != ${ls} ]] && newls="${newls} ${f}"
1452 else 1452 else
1453 [[ ${ls/ ${f} /} == ${ls} ]] && newls="${newls} ${f}" 1453 [[ ${ls/ ${f} /} == ${ls} ]] && newls="${newls} ${f}"
1454 fi 1454 fi

Legend:
Removed from v.1.225  
changed lines
  Added in v.1.226

  ViewVC Help
Powered by ViewVC 1.1.20