| 1 | # Copyright 1999-2002 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2004 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/sgml-catalog.eclass,v 1.9 2004/10/19 19:51:12 vapier Exp $ |
|
|
4 | # |
| 3 | # Author Matthew Turk <satai@gentoo.org> |
5 | # Author Matthew Turk <satai@gentoo.org> |
| 4 | # $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.3 2003/01/03 05:05:55 satai Exp $ |
|
|
| 5 | # |
|
|
| 6 | |
6 | |
| 7 | inherit base |
7 | inherit base |
| 8 | INHERITED="$INHERITED $ECLASS" |
8 | INHERITED="$INHERITED $ECLASS" |
| 9 | |
9 | |
| 10 | newdepend ">=sgml-common-0.6.3-r2" |
10 | DEPEND=">=app-text/sgml-common-0.6.3-r2" |
| 11 | ECLASS=sgml-catalog |
11 | ECLASS=sgml-catalog |
| 12 | |
12 | |
| 13 | declare -a toinstall |
13 | declare -a toinstall |
| 14 | declare -i catcounter |
14 | declare -i catcounter |
| 15 | let "catcounter=0" |
15 | let "catcounter=0" |
| … | |
… | |
| 40 | if [ ! -e $arg2 ] |
40 | if [ ! -e $arg2 ] |
| 41 | then |
41 | then |
| 42 | ewarn "${arg2} doesn't appear to exist, although it ought to!" |
42 | ewarn "${arg2} doesn't appear to exist, although it ought to!" |
| 43 | continue |
43 | continue |
| 44 | fi |
44 | fi |
| 45 | einfo "Now adding $arg1 to $arg2 and /etc/sgml/catalog" |
45 | einfo "Now adding $arg2 to $arg1 and /etc/sgml/catalog" |
| 46 | sgml-catalog_cat_doinstall $arg1 $arg2 |
46 | sgml-catalog_cat_doinstall $arg1 $arg2 |
| 47 | done |
47 | done |
| 48 | sgml-catalog_cleanup |
48 | sgml-catalog_cleanup |
| 49 | } |
49 | } |
| 50 | |
50 | |
| … | |
… | |
| 61 | arg1=`echo ${toinstall[$i]} | cut -f1 -d\:` |
61 | arg1=`echo ${toinstall[$i]} | cut -f1 -d\:` |
| 62 | arg2=`echo ${toinstall[$i]} | cut -f2 -d\:` |
62 | arg2=`echo ${toinstall[$i]} | cut -f2 -d\:` |
| 63 | if [ -e $arg2 ] |
63 | if [ -e $arg2 ] |
| 64 | then |
64 | then |
| 65 | ewarn "${arg2} still exists! Not removing from ${arg1}" |
65 | ewarn "${arg2} still exists! Not removing from ${arg1}" |
| 66 | ewarn "This is normal behavior for an upgrade..." |
66 | ewarn "This is normal behavior for an upgrade ..." |
| 67 | continue |
67 | continue |
| 68 | fi |
68 | fi |
| 69 | einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog" |
69 | einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog" |
| 70 | sgml-catalog_cat_doremove $arg1 $arg2 |
70 | sgml-catalog_cat_doremove $arg1 $arg2 |
| 71 | done |
71 | done |
| 72 | } |
72 | } |
| 73 | |
73 | |
| 74 | sgml-catalog_cleanup() { |
74 | sgml-catalog_cleanup() { |
| 75 | if [ -e /usr/bin/gensgmlenv ] |
75 | if [ -e /usr/bin/gensgmlenv ] |
| 76 | then |
76 | then |
| 77 | einfo Regenerating SGML environment variables... |
77 | einfo Regenerating SGML environment variables ... |
| 78 | gensgmlenv |
78 | gensgmlenv |
| 79 | grep -v export /etc/sgml/sgml.env > /etc/env.d/93sgmltools-lite |
79 | grep -v export /etc/sgml/sgml.env > /etc/env.d/93sgmltools-lite |
| 80 | fi |
80 | fi |
| 81 | } |
81 | } |
| 82 | |
82 | |