1
0
Dr. Werner Fink 2017-07-18 11:04:01 +00:00 committed by Git OBS Bridge
parent f0d76853bf
commit 0f175d59a1
2 changed files with 77 additions and 59 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jul 18 11:02:31 UTC 2017 - werner@suse.de
- Make update.texlive faster and remove specific tag file after
creating specific format
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 12 07:41:21 UTC 2017 - werner@suse.de Wed Jul 12 07:41:21 UTC 2017 - werner@suse.de

View File

@ -178,15 +178,16 @@ do
mf|mfw|mf-nowin) fmt="$format.base"; kpse=mf; engine=metafont ;; mf|mfw|mf-nowin) fmt="$format.base"; kpse=mf; engine=metafont ;;
*) fmt="$format.fmt"; kpse=tex; engine=$engine ;; *) fmt="$format.fmt"; kpse=tex; engine=$engine ;;
esac esac
inifile=$(kpsewhich -progname=$format -format=$kpse $inifile 2>/dev/null) || continue test -d ${WEB2C}/$engine || mkdir -p ${WEB2C}/$engine
fmt="$(find ${WEB2C}/$engine -name $fmt)" fmt="${WEB2C}/$engine/$fmt"
if test -z "$fmt" if test ! -e "$fmt"
then then
# init=true # init=true
# > /var/run/texlive/run-fmtutil # > /var/run/texlive/run-fmtutil
continue continue
fi fi
test "$fmt" -nt "$TEXMFCNFFILE" || init=true test "$fmt" -nt "$TEXMFCNFFILE" || init=true
inifile=$(kpsewhich -progname=$format -format=$kpse $inifile 2>/dev/null) || continue
test "$fmt" -nt "$inifile" && continue test "$fmt" -nt "$inifile" && continue
case "$engine" in case "$engine" in
mpost) fmtutil-sys --byfmt "$egine" < /dev/null 1>&4 2>&4 ;; mpost) fmtutil-sys --byfmt "$egine" < /dev/null 1>&4 2>&4 ;;
@ -213,6 +214,7 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then
# #
# Handle hyphens # Handle hyphens
# #
typeset -i refresh=0
for run in /var/run/texlive/run-hyphen* ; do for run in /var/run/texlive/run-hyphen* ; do
test -e "$run" || break test -e "$run" || break
tmp=${cnf_ldat}.$RANDOM tmp=${cnf_ldat}.$RANDOM
@ -224,6 +226,7 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then
cat "$dat" cat "$dat"
done >> $tmp done >> $tmp
mv -f $tmp ${cnf_ldat} mv -f $tmp ${cnf_ldat}
let refresh++
# #
tmp=${cnf_ldef}.$RANDOM tmp=${cnf_ldef}.$RANDOM
cat ${TEXMFDIST}/tex/generic/config/language.us.def >> $tmp cat ${TEXMFDIST}/tex/generic/config/language.us.def >> $tmp
@ -235,6 +238,7 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then
echo >> $tmp echo >> $tmp
echo '\uselanguage {USenglish} %%% This MUST be the last line of the file.' >> $tmp echo '\uselanguage {USenglish} %%% This MUST be the last line of the file.' >> $tmp
mv -f $tmp ${cnf_ldef} mv -f $tmp ${cnf_ldef}
let refresh++
# #
tmp=${cnf_llua}.$RANDOM tmp=${cnf_llua}.$RANDOM
echo "-- Generated by ${TEXMFDIST}/texconfig/update on $(date)" > $tmp echo "-- Generated by ${TEXMFDIST}/texconfig/update on $(date)" > $tmp
@ -246,10 +250,13 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then
# Silent editor { # Silent editor {
echo '}' >> $tmp echo '}' >> $tmp
mv -f $tmp ${cnf_llua} mv -f $tmp ${cnf_llua}
let refresh++
set +C set +C
rm -f /var/run/texlive/run-hyphen* rm -f /var/run/texlive/run-hyphen*
done done
if ((refresh > 0))
then
# #
# New md5 sums # New md5 sums
# #
@ -271,19 +278,22 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then
elif test ! -d ${md5_ldat%/*} ; then elif test ! -d ${md5_ldat%/*} ; then
mkdir -p ${md5_ldat%/*} mkdir -p ${md5_ldat%/*}
fi fi
echo "$md5ldat" > $md5_ldat
if test -e ${md5_ldef} -a -r ${md5_ldef} ; then if test -e ${md5_ldef} -a -r ${md5_ldef} ; then
set -- $(cat ${md5_ldef}) ; omd5ldef="$1" set -- $(cat ${md5_ldef}) ; omd5ldef="$1"
elif test ! -d ${md5_ldef%/*} ; then elif test ! -d ${md5_ldef%/*} ; then
mkdir -p ${md5_ldef%/*} mkdir -p ${md5_ldef%/*}
fi fi
echo "$md5ldef" > $md5_ldef
if test -e ${md5_llua} -a -r ${md5_llua} ; then if test -e ${md5_llua} -a -r ${md5_llua} ; then
set -- $(cat ${md5_llua}) ; omd5llua="$1" set -- $(cat ${md5_llua}) ; omd5llua="$1"
elif test ! -d ${md5_llua%/*} ; then elif test ! -d ${md5_llua%/*} ; then
mkdir -p ${md5_llua%/*} mkdir -p ${md5_llua%/*}
fi fi
echo "$md5llua" > $md5_llua
# #
# Create new formats for new language.dat and/or language.def if needed # Refresh formats for new language.dat and/or language.def if needed
# #
while read format engine language rest while read format engine language rest
do do
@ -295,9 +305,10 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then
mf|mfw|mf-nowin) continue ;; mf|mfw|mf-nowin) continue ;;
*) fmt="$format.fmt"; kpse=tex; engine=$engine ;; *) fmt="$format.fmt"; kpse=tex; engine=$engine ;;
esac esac
test -d ${WEB2C}/$engine || mkdir -p ${WEB2C}/$engine
fmt="${WEB2C}/$engine/$fmt"
test -e "$fmt" || continue
inifile=$(kpsewhich -progname=$format -format=$kpse $inifile 2>/dev/null) || continue inifile=$(kpsewhich -progname=$format -format=$kpse $inifile 2>/dev/null) || continue
fmt="$(find ${WEB2C}/$engine -name $fmt)"
test -z "$fmt" && continue
for lang in ${language//,/ } for lang in ${language//,/ }
do do
for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua} for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua}
@ -311,6 +322,7 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then
done < <(sed -r "/^(\#.*|[[:blank:]]*)$/d" "$cnf_fmtu") done < <(sed -r "/^(\#.*|[[:blank:]]*)$/d" "$cnf_fmtu")
unset format engine language lang rest line last inifile fmt kpse engine unset format engine language lang rest line last inifile fmt kpse engine
fi fi
fi
tcfmgr () tcfmgr ()
{ {
@ -428,7 +440,7 @@ for run in /var/run/texlive/run-fmtutil* ; do
fmtutil-sys ${option:+$option} --byfmt "${run#*fmtutil.}" < /dev/null 1>&4 2>&4 fmtutil-sys ${option:+$option} --byfmt "${run#*fmtutil.}" < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
test $VERBOSE = true && echo test $VERBOSE = true && echo
((rc != 0)) || rm -f /var/run/texlive/run-fmtutil ((rc != 0)) || rm -f "${run}"
esac esac
done done