summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-02-23 01:10:58 +0000
committerMike Frysinger <vapier@gentoo.org>2005-02-23 01:10:58 +0000
commit06e5b00a62c771421f35a89870219e2a6c2d50e8 (patch)
treefc214dfff79a5d3801fc96834914e45268d22989 /eclass/eutils.eclass
parentversion bump (diff)
downloadgentoo-2-06e5b00a62c771421f35a89870219e2a6c2d50e8.tar.gz
gentoo-2-06e5b00a62c771421f35a89870219e2a6c2d50e8.tar.bz2
gentoo-2-06e5b00a62c771421f35a89870219e2a6c2d50e8.zip
style update for strip-linguas and make sure the returned LINGUAS doesnt have a leading space #82889 by Sok Ann Yap
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass30
1 files changed, 15 insertions, 15 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 46fcf6492b37..8e4b45843722 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.153 2005/02/18 21:55:35 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.154 2005/02/23 01:10:58 vapier Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -1481,43 +1481,43 @@ cdrom_locate_file_on_cd() {
# directories and uses the union of the lists.
strip-linguas() {
local ls newls
- if [ "$1" == "-i" ] || [ "$1" == "-u" ] ; then
- local op="$1"; shift
+ if [[ $1 == "-i" ]] || [[ $1 == "-u" ]] ; then
+ local op=$1; shift
ls=" $(find "$1" -name '*.po' -printf '%f ') "; shift
local d f
for d in "$@" ; do
- if [ "${op}" == "-u" ] ; then
- newls="${ls}"
+ if [[ ${op} == "-u" ]] ; then
+ newls=${ls}
else
newls=""
fi
for f in $(find "$d" -name '*.po' -printf '%f ') ; do
- if [ "${op}" == "-i" ] ; then
- [ "${ls/ ${f} /}" != "${ls}" ] && newls="${newls} ${f}"
+ if [[ ${op} == "-i" ]] ; then
+ [[ ${ls/ ${f} /} != ${ls} ]] && newls="${newls} ${f}"
else
- [ "${ls/ ${f} /}" == "${ls}" ] && newls="${newls} ${f}"
+ [[ ${ls/ ${f} /} == ${ls} ]] && newls="${newls} ${f}"
fi
done
- ls="${newls}"
+ ls=${newls}
done
- ls="${ls//.po}"
+ ls=${ls//.po}
else
- ls="$@"
+ ls=$@
fi
ls=" ${ls} "
newls=""
for f in ${LINGUAS} ; do
- if [ "${ls/ ${f} /}" != "${ls}" ] ; then
+ if [[ ${ls/ ${f} /} != ${ls} ]] ; then
newls="${newls} ${f}"
else
ewarn "Sorry, but ${PN} does not support the ${f} LINGUA"
fi
done
- if [ -z "${newls}" ] ; then
+ if [[ -z ${newls} ]] ; then
unset LINGUAS
else
- export LINGUAS="${newls}"
+ export LINGUAS=${newls:1}
fi
}