1
# common.functions start
4
# build_format_if_format_exists
5
# $1 = fmtutil mode switch: --byfmt | --byhyphen | --all
6
# $2 = name of the format
7
# $3 = possible additional options (byhyphen -> hyphenfile)
8
build_format_if_format_exists ()
10
#X=`fmtutil-sys --listcfg | grep "^$2[[:space:]]" || true`
11
v=`kpsewhich -var-value TEXMFSYSVAR`
12
c=`kpsewhich -var-value TEXMFSYSCONFIG`
15
export TEXMFVAR TEXMFCONFIG
16
fmtcnffile=`kpsewhich --format='web2c files' fmtutil.cnf`
17
X=`grep "^[[:space:]]*$2[[:space:]]" $fmtcnffile || true`
18
if [ ! "X$X" = "X" ] ; then
19
if [ "X$1" = "X--byhyphen" ] ; then
20
build_format --byhyphen $3
27
build_format_if_file_exists ()
29
X=`kpsewhich $3 || true`
30
if [ ! "X$X" = "X" ] ; then
37
tempfile=`mktemp -p /tmp texlive.fmtutil.XXXXXXXX`
38
printf "Building format(s) $1 `basename "$2"`. This may take some time..."
39
if fmtutil-sys $1 $2 > $tempfile 2>&1 ; then
44
echo "fmtutil-sys failed. Output has been stored in"
46
echo "Please include this file if you report a bug."
52
check_run_without_errors ()
54
tempfile=`mktemp -p /tmp texlive.checkrun.XXXXXXXX`
55
if which $1 >/dev/null; then
56
printf "Running $*. This may take some time..."
64
echo "$* failed. Output has been stored in"
66
echo "If tex-common is not configured you can ignore this error message!"
67
echo "Otherwise please include this file if you report a bug."
77
# stolen from tetex common.functions.in
80
tempfile=`mktemp -p /tmp texlive.updmap.XXXXXXXX`
81
printf "Running updmap-sys. This may take some time..."
82
if updmap-sys > $tempfile 2>&1 ; then
87
echo "updmap failed. Output has been stored in"
89
echo "Please include this file if you report a bug."
97
tempfile=`mktemp -p /tmp texlive.mktexlsr.XXXXXXXX`
98
printf "Running mktexlsr. This may take some time..."
99
if mktexlsr /usr/share/texmf /usr/share/texmf-texlive /var/lib/texmf > $tempfile 2>&1 ; then
104
echo "mktexlsr failed. Output has been stored in"
106
echo "Please include this file if you report a bug."
112
# common.functions end