Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/texlive-core/files: texmf-update2008
Date: Tue, 09 Sep 2008 15:13:38
Message-Id: E1Kd4uN-0001iC-Ld@stork.gentoo.org
1 aballier 08/09/09 15:13:35
2
3 Added: texmf-update2008
4 Log:
5 Bump to 2008
6 (Portage version: 2.2_rc8/cvs/Linux 2.6.26.3 x86_64)
7
8 Revision Changes Path
9 1.1 app-text/texlive-core/files/texmf-update2008
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/texlive-core/files/texmf-update2008?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/texlive-core/files/texmf-update2008?rev=1.1&content-type=text/plain
13
14 Index: texmf-update2008
15 ===================================================================
16 #!/bin/bash
17 #
18 # Utility to update Gentoo TeXLive distribution configuration files
19 #
20
21 echo "Configuring TeXLive ..."
22
23 PATH=/bin:/usr/bin
24
25 # Fix for all those with altered umask for root
26 umask 022
27
28 # Make sure we have a correct environment, bug #30432
29 # The list of env. vars is taken from the INSTALL file
30 for texvar in AFMFONTS BIBINPUTS BSTINPUTS DVILJFONTS DVIPSFONTS \
31 DVIPSHEADERS GFFONTS GLYPHFONTS INDEXSTYLE MFBASES MFINPUTS \
32 MFPOOL MFTINPUTS MPINPUTS MPMEMS MPPOOL MPSUPPORT OCPINPUTS \
33 OFMFONTS OPLFONTS OTPINPUTS OVFFONTS OVPFONTS PKFONTS PSHEADERS \
34 T1FONTS T1INPUTS TEXBIB TEXCONFIG TEXDOCS TEXFONTMAPS TEXFONTS \
35 TEXFORMATS TEXINDEXSTYLE TEXINPUTS TEXMFCNF TEXMFDBS TEXMFINI \
36 TEXPICTS TEXPKS TEXPOOL TEXPSHEADERS TEXSOURCES TFMFONTS TRFONTS \
37 VFFONTS XDVIFONTS XDVIVFS ; do
38
39 if [ "${!texvar}" ]; then
40 if ! $(echo ${!texvar} | grep '^:\|::\|:$' &>/dev/null) ; then
41 export ${texvar}="${!texvar}:"
42 fi
43 fi
44 done
45
46 if [ "$TEXINPUTS" ]; then
47 if $(echo ${TEXINPUTS} | grep '/usr/share/texmf' &>/dev/null) ; then
48 export TEXINPUTS=$(echo ${TEXINPUTS} | sed -e 's|/usr/share/texmf/*:\?||g')
49 elif $(echo ${TEXINPUTS} | grep '/var/lib/texmf' &>/dev/null) ; then
50 export TEXINPUTS=$(echo ${TEXINPUTS} | sed -e 's|/var/lib/texmf/*:\?||g')
51 fi
52 fi
53
54 if [ -d /etc/texmf/texmf.d ]; then
55 echo "Generating /etc/texmf/web2c/texmf.cnf from /etc/texmf/texmf.d ..."
56 cat /etc/texmf/texmf.d/*.cnf > "/etc/texmf/web2c/texmf.cnf"
57 fi
58
59 if [ -d /etc/texmf/fmtutil.d ]; then
60 echo "Generating /etc/texmf/web2c/fmtutil.cnf from /etc/texmf/fmtutil.d ..."
61 cat /etc/texmf/fmtutil.d/*.cnf > "/etc/texmf/web2c/fmtutil.cnf"
62 fi
63
64 if [ -d /etc/texmf/updmap.d ]; then
65 echo "Generating /etc/texmf/web2c/updmap.cfg from /etc/texmf/updmap.d ..."
66 cat /etc/texmf/updmap.d/*.cfg > "/etc/texmf/web2c/updmap.cfg"
67 fi
68
69 if [ -d /etc/texmf/dvips.d ]; then
70 echo "Generating /etc/texmf/dvips/config/config.ps from /etc/texmf/dvips.d ..."
71 cat /etc/texmf/dvips.d/*.ps > "/etc/texmf/dvips/config/config.ps"
72 fi
73
74 echo "Generating ls-R files"
75 mktexlsr &>/dev/null
76
77 # Generate language.dat file, from texlive install-pkg.sh
78 X=`kpsewhich language.dat`
79 if test -n "$X"; then
80 echo "Generating language.dat file"
81 cd `dirname $X`
82 Z=`pwd`
83
84 Y=`kpsewhich language.us`
85 cd `dirname $Y`
86 cat language.us > $Z/language.dat
87 for i in /etc/texmf/language.dat.d/language.*.dat; do
88 test -f $i && cat $i >> $Z/language.dat
89 done
90 fi
91
92 # Generate language.def file.
93 X=`kpsewhich language.def`
94 Y=`kpsewhich language.us.def`
95 if test -n "$X" -a -n "$Y" ; then
96 echo "Generating language.def file"
97 cd `dirname $X`
98 Z=`pwd`
99
100 cd `dirname $Y`
101 cat language.us.def > $Z/language.def
102 for i in /etc/texmf/language.def.d/language.*.def; do
103 test -f $i && cat $i >> $Z/language.def
104 done
105 cat << EOF >> $Z/language.def
106 %%% No changes may be made beyond this point.
107
108 \uselanguage {USenglish} %%% This MUST be the last line of the file.
109 EOF
110 fi
111
112 echo "Generating format files ..."
113 fmtutil-sys --all &>/dev/null
114
115 echo "Generating font maps..."
116 updmap-sys &>/dev/null
117
118 echo
119 echo "Use 'texconfig font ro'(rw) to disable (enable) font generation for users"
120 echo