1 | # Copyright 1999-2007 Gentoo Foundation |
1 | # Copyright 1999-2007 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.286 2007/07/17 11:59:18 swegener Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.287 2007/07/26 05:43:12 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 |
… | |
… | |
1506 | einfo "check that CONFIG_JOLIET is enabled in your kernel." |
1506 | einfo "check that CONFIG_JOLIET is enabled in your kernel." |
1507 | read || die "something is screwed with your system" |
1507 | read || die "something is screwed with your system" |
1508 | done |
1508 | done |
1509 | } |
1509 | } |
1510 | |
1510 | |
|
|
1511 | # @FUNCTION: strip-linguas |
|
|
1512 | # @USAGE: [<allow LINGUAS>|<-i|-u> <directories of .po files>] |
|
|
1513 | # @DESCRIPTION: |
1511 | # Make sure that LINGUAS only contains languages that |
1514 | # Make sure that LINGUAS only contains languages that |
1512 | # a package can support |
1515 | # a package can support. The first form allows you to |
1513 | # |
1516 | # specify a list of LINGUAS. The -i builds a list of po |
1514 | # usage: strip-linguas <allow LINGUAS> |
1517 | # files found in all the directories and uses the |
1515 | # strip-linguas -i <directories of .po files> |
1518 | # intersection of the lists. The -u builds a list of po |
1516 | # strip-linguas -u <directories of .po files> |
1519 | # files found in all the directories and uses the union |
1517 | # |
1520 | # of the lists. |
1518 | # The first form allows you to specify a list of LINGUAS. |
|
|
1519 | # The -i builds a list of po files found in all the |
|
|
1520 | # directories and uses the intersection of the lists. |
|
|
1521 | # The -u builds a list of po files found in all the |
|
|
1522 | # directories and uses the union of the lists. |
|
|
1523 | strip-linguas() { |
1521 | strip-linguas() { |
1524 | local ls newls nols |
1522 | local ls newls nols |
1525 | if [[ $1 == "-i" ]] || [[ $1 == "-u" ]] ; then |
1523 | if [[ $1 == "-i" ]] || [[ $1 == "-u" ]] ; then |
1526 | local op=$1; shift |
1524 | local op=$1; shift |
1527 | ls=$(find "$1" -name '*.po' -exec basename {} .po \;); shift |
1525 | ls=$(find "$1" -name '*.po' -exec basename {} .po \;); shift |