summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Boshell <leonardop@gentoo.org>2005-09-08 17:37:32 +0000
committerLeonardo Boshell <leonardop@gentoo.org>2005-09-08 17:37:32 +0000
commit44c35a006055727afeea0de21b3753473fdd29aa (patch)
tree591b891cd8380fbd64166e5527e967bbf97b0d28 /eclass/sgml-catalog.eclass
parent* gnome2.eclass: (gnome2_icon_cache_update): Only run gtk-update-icon-cache (diff)
downloadgentoo-2-44c35a006055727afeea0de21b3753473fdd29aa.tar.gz
gentoo-2-44c35a006055727afeea0de21b3753473fdd29aa.tar.bz2
gentoo-2-44c35a006055727afeea0de21b3753473fdd29aa.zip
* sgml-catalog.eclass: Use a global scalar instead of a bash array. Avoid
calling 'seq' (bug #103383).
Diffstat (limited to 'eclass/sgml-catalog.eclass')
-rw-r--r--eclass/sgml-catalog.eclass31
1 files changed, 14 insertions, 17 deletions
diff --git a/eclass/sgml-catalog.eclass b/eclass/sgml-catalog.eclass
index e3111b46d404..02c4caa93df4 100644
--- a/eclass/sgml-catalog.eclass
+++ b/eclass/sgml-catalog.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.13 2005/07/15 17:01:14 leonardop Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.14 2005/09/08 17:37:32 leonardop Exp $
#
# Author Matthew Turk <satai@gentoo.org>
@@ -8,13 +8,14 @@ inherit base
DEPEND=">=app-text/sgml-common-0.6.3-r2"
-declare -a toinstall
-declare -i catcounter
-let "catcounter=0"
+
+# List of catalogs to install
+SGML_TOINSTALL=""
+
sgml-catalog_cat_include() {
debug-print function $FUNCNAME $*
- toinstall["catcounter++"]="${1}:${2}"
+ SGML_TOINSTALL="${SGML_TOINSTALL} ${1}:${2}"
}
sgml-catalog_cat_doinstall() {
@@ -29,12 +30,10 @@ sgml-catalog_cat_doremove() {
sgml-catalog_pkg_postinst() {
debug-print function $FUNCNAME $*
- declare -i topindex
- topindex="catcounter-1"
- for i in `seq 0 ${topindex}`
- do
- arg1=`echo ${toinstall[$i]} | cut -f1 -d\:`
- arg2=`echo ${toinstall[$i]} | cut -f2 -d\:`
+
+ for entry in ${SGML_TOINSTALL}; do
+ arg1=`echo ${entry} | cut -f1 -d\:`
+ arg2=`echo ${entry} | cut -f2 -d\:`
if [ ! -e ${arg2} ]
then
ewarn "${arg2} doesn't appear to exist, although it ought to!"
@@ -52,12 +51,10 @@ sgml-catalog_pkg_prerm() {
sgml-catalog_pkg_postrm() {
debug-print function $FUNCNAME $*
- declare -i topindex
- topindex="catcounter-1"
- for i in `seq 0 ${topindex}`
- do
- arg1=`echo ${toinstall[$i]} | cut -f1 -d\:`
- arg2=`echo ${toinstall[$i]} | cut -f2 -d\:`
+
+ for entry in ${SGML_TOINSTALL}; do
+ arg1=`echo ${entry} | cut -f1 -d\:`
+ arg2=`echo ${entry} | cut -f2 -d\:`
if [ -e ${arg2} ]
then
ewarn "${arg2} still exists! Not removing from ${arg1}"