From fc92c82502cef2096b2d8f8faf58cb29f37624cf9b13797c35765b323e4b32d5 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 11 Jul 2017 15:47:59 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=67 --- update.texlive | 73 +++++++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/update.texlive b/update.texlive index 573d385..ee03479 100644 --- a/update.texlive +++ b/update.texlive @@ -168,23 +168,33 @@ done unset hyp suffix init=false -while read egine required +while read format engine language rest do - required="${required##* }" - required="$(kpsewhich "${required#\*}" 2>/dev/null)" - test -e "$required" || continue - fmt="$(find ${WEB2C} -name "${egine}.fmt" -o -name "${egine}.mem" -o -name "${egine}.base")" - test -e "$fmt" || continue + line=($rest) + last=${line[-1]} + inifile=${last#\*} + case "$engine" in + mpost) fmt="$format.mem"; kpse=mpost; engine=metapost ;; + mf|mfw|mf-nowin) fmt="$format.base"; kpse=mf; engine=metafont ;; + *) fmt="$format.fmt"; kpse=tex; engine=$engine ;; + esac + inifile=$(kpsewhich -progname=$format -format=$kpse $inifile 2>/dev/null) || continue + fmt="$(find ${WEB2C}/$engine -name $fmt)" + if test -z "$fmt" + then +# init=true +# > /var/run/texlive/run-fmtutil + continue + fi test "$fmt" -nt "$TEXMFCNFFILE" || init=true - test "$fmt" -nt "$required" && continue - case "${fmt##*.}" in - fmt) - > /var/run/texlive/run-fmtutil.refresh ;; - base|mem) - fmtutil-sys --byfmt "$egine" ;; + test "$fmt" -nt "$inifile" && continue + case "$engine" in + mpost) fmtutil-sys --byfmt "$egine" < /dev/null 1>&4 2>&4 ;; + mf|mfw|mf-nowin) fmtutil-sys --byfmt "$egine" < /dev/null 1>&4 2>&4 ;; + *) > /var/run/texlive/run-fmtutil.refresh esac done < <(sed -r "/^(\#.*|[[:blank:]]*)$/d" "$cnf_fmtu") -unset egine fmt required +unset format engine language rest line last inifile fmt kpse engine if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua} ; do @@ -275,28 +285,31 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then # # Create new formats for new language.dat and/or language.def if needed # - while read egine required + while read format engine language rest do - case "$required" in - *language.*) ;; - *) continue ;; + line=($rest) + last=${line[-1]} + inifile=${last#\*} + case "$engine" in + mpost) continue ;; + mf|mfw|mf-nowin) continue ;; + *) fmt="$format.fmt"; kpse=tex; engine=$engine ;; esac - language=language${required#*language} - language=${language%% *} - required="${required##* }" - required="$(kpsewhich "${required#\*}" 2>/dev/null)" - test -e "$required" || continue - fmt="$(find ${WEB2C} -name "${egine}.fmt")" - test -e "$fmt" || continue - for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua} + 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//,/ } do - test $language = "${cfg##*/}" || continue - test $fmt -nt $cfg && continue - > /var/run/texlive/run-fmtutil.language - break 2 + for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua} + do + test $lang = "${cfg##*/}" || continue + test $fmt -nt $cfg && continue + > /var/run/texlive/run-fmtutil.language + break 3 + done done done < <(sed -r "/^(\#.*|[[:blank:]]*)$/d" "$cnf_fmtu") - unset egine fmt required + unset format engine language lang rest line last inifile fmt kpse engine fi tcfmgr ()