.
OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=17
This commit is contained in:
parent
35b959c943
commit
4fa3108442
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 12 09:54:02 UTC 2012 - werner@suse.de
|
||||||
|
|
||||||
|
- Make update script to run updmap-sys only once on texhash
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 11 15:18:34 UTC 2012 - werner@suse.de
|
Tue Sep 11 15:18:34 UTC 2012 - werner@suse.de
|
||||||
|
|
||||||
|
103
update.texlive
103
update.texlive
@ -46,12 +46,18 @@ test $size -lt 80 && > /var/run/texlive/run-mktexlsr
|
|||||||
|
|
||||||
rotator ()
|
rotator ()
|
||||||
{
|
{
|
||||||
local -i i=0
|
local -i i=0 n=0
|
||||||
local -a elements=('|' '/' '-' '\')
|
local -a elements=('|' '/' '-' '\')
|
||||||
while read -s -n 1 ; do
|
while read -s -n 1 ; do
|
||||||
printf "\r[${elements[((i++%4))]}]"
|
printf "\r[${elements[((i++%4))]}]"
|
||||||
|
let n=1
|
||||||
done
|
done
|
||||||
echo
|
((n > 0)) && echo
|
||||||
|
}
|
||||||
|
|
||||||
|
atexit()
|
||||||
|
{
|
||||||
|
exec 4>&-
|
||||||
}
|
}
|
||||||
|
|
||||||
if test $VERBOSE = true ; then
|
if test $VERBOSE = true ; then
|
||||||
@ -59,6 +65,7 @@ if test $VERBOSE = true ; then
|
|||||||
else
|
else
|
||||||
exec 4> /dev/null
|
exec 4> /dev/null
|
||||||
fi
|
fi
|
||||||
|
trap atexit EXIT
|
||||||
|
|
||||||
type -p mktexlsr &> /dev/null || { echo "${0##*/}: No mktexlsr in PATH ... skipping" 1>&2; exit 0 ; }
|
type -p mktexlsr &> /dev/null || { echo "${0##*/}: No mktexlsr in PATH ... skipping" 1>&2; exit 0 ; }
|
||||||
|
|
||||||
@ -72,6 +79,7 @@ for run in /var/run/texlive/run-mktexlsr* ; do
|
|||||||
let rc+=$?
|
let rc+=$?
|
||||||
test $VERBOSE = true && echo
|
test $VERBOSE = true && echo
|
||||||
rm -f /var/run/texlive/run-mktexlsr*
|
rm -f /var/run/texlive/run-mktexlsr*
|
||||||
|
> /var/run/texlive/sync-updmap
|
||||||
done
|
done
|
||||||
|
|
||||||
type -p kpsewhich &> /dev/null || { echo "${0##*/}: No kpsewhich in PATH ... skipping" 1>&2; exit 0 ; }
|
type -p kpsewhich &> /dev/null || { echo "${0##*/}: No kpsewhich in PATH ... skipping" 1>&2; exit 0 ; }
|
||||||
@ -159,10 +167,23 @@ tcfmgr ()
|
|||||||
|
|
||||||
enablemaps ()
|
enablemaps ()
|
||||||
{
|
{
|
||||||
updmap-sys --quiet --nohash --listmaps < /dev/null 2> /dev/null | \
|
local -i rc=0
|
||||||
sed -n -r 's@(#![[:space:]])(Mixed)?Map[[:space:]]*@@gp' | \
|
local -i hash=0
|
||||||
|
local maps=($(updmap-sys --quiet --nohash --listmaps < /dev/null 2> /dev/null | \
|
||||||
|
sed -n -r 's@(#![[:blank:]])(Mixed|Kanji)?Map[[:blank:]]*@@gp' | \
|
||||||
xargs -r kpsewhich --format=map 2> /dev/null | \
|
xargs -r kpsewhich --format=map 2> /dev/null | \
|
||||||
sed -r 's@.*/([^/]*)@\1@g'
|
sed -r 's@.*/([^/]*)@\1@g'))
|
||||||
|
local line emap
|
||||||
|
((${#maps} == 0)) && return $rc
|
||||||
|
for line in ${maps[@]} ; do
|
||||||
|
let hash++
|
||||||
|
line='^#![[:blank:]]*((Mixed|Kanji)?Map)[[:blank:]]*('$line')'
|
||||||
|
emap=$(sed -n -r "s/$line/\1=\3/p" ${cfg})
|
||||||
|
updmap-sys --nohash --nomkmap --enable $emap
|
||||||
|
let rc+=$?
|
||||||
|
done
|
||||||
|
((hash > 0)) && > /var/run/texlive/run-mktexlsr
|
||||||
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -198,36 +219,51 @@ for run in /var/run/texlive/run-fmtutil* ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for run in /var/run/texlive/run-updmap* ; do
|
for run in /var/run/texlive/run-updmap* ; do
|
||||||
if test -e $run ; then
|
test -e $run || break
|
||||||
type -p updmap-sys &> /dev/null || { echo "${0##*/}: No updmap-sys in PATH ... skipping" 1>&2; break; }
|
type -p updmap-sys &> /dev/null || { echo "${0##*/}: No updmap-sys in PATH ... skipping" 1>&2; break; }
|
||||||
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings."
|
cfg=$(tcfmgr --cmd find --file updmap.cfg)
|
||||||
|
test -e $cfg || break
|
||||||
|
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings."
|
||||||
|
updmap-sys --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4
|
||||||
|
let rc+=$?
|
||||||
|
enablemaps $cfg < /dev/null 1>&4 2>&4
|
||||||
|
let rc+=$?
|
||||||
|
if test -e /var/run/texlive/run-mktexlsr ; then
|
||||||
|
updmap-sys < /dev/null 1>&4 2>&4
|
||||||
|
let rc+=$?
|
||||||
|
else
|
||||||
updmap-sys --nohash < /dev/null 1>&4 2>&4
|
updmap-sys --nohash < /dev/null 1>&4 2>&4
|
||||||
let rc+=$?
|
let rc+=$?
|
||||||
test $VERBOSE = true && echo
|
|
||||||
rm -f /var/run/texlive/run-updmap*
|
|
||||||
else
|
|
||||||
type -p updmap-sys &> /dev/null || break
|
|
||||||
typeset -i n=0
|
|
||||||
cfg=$(tcfmgr --cmd find --file updmap.cfg)
|
|
||||||
if test -e ${cfg} ; then
|
|
||||||
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings."
|
|
||||||
updmap-sys --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4
|
|
||||||
let rc+=$?
|
|
||||||
while read line ; do
|
|
||||||
let n++
|
|
||||||
line='^#![[:space:]]*((Mixed)?Map)[[:space:]]*('$line')'
|
|
||||||
emap=$(sed -n -r "s/$line/\1=\3/p" ${cfg})
|
|
||||||
updmap-sys --nohash --nomkmap --enable $emap < /dev/null 1>&4 2>&4
|
|
||||||
let rc+=$?
|
|
||||||
done < <(enablemaps)
|
|
||||||
if ((n > 0)) ; then
|
|
||||||
updmap-sys < /dev/null 1>&4 2>&4
|
|
||||||
let rc+=$?
|
|
||||||
fi
|
|
||||||
test $VERBOSE = true && echo
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
# test $VERBOSE = true && echo
|
||||||
|
rm -f /var/run/texlive/run-updmap*
|
||||||
|
rm -f /var/run/texlive/sync-updmap*
|
||||||
|
rm -f /var/run/texlive/run-mktexlsr*
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for run in /var/run/texlive/sync-updmap* ; do
|
||||||
|
test -e $run || break
|
||||||
|
type -p updmap-sys &> /dev/null || break
|
||||||
|
cfg=$(tcfmgr --cmd find --file updmap.cfg)
|
||||||
|
test -e $cfg || break
|
||||||
|
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings."
|
||||||
|
updmap-sys --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4
|
||||||
|
let rc+=$?
|
||||||
|
enablemaps $cfg < /dev/null 1>&4 2>&4
|
||||||
|
let rc+=$?
|
||||||
|
if test -e /var/run/texlive/run-mktexlsr ; then
|
||||||
|
updmap-sys < /dev/null 1>&4 2>&4
|
||||||
|
let rc+=$?
|
||||||
|
rm -f /var/run/texlive/run-mktexlsr*
|
||||||
|
else
|
||||||
|
updmap-sys --nohash < /dev/null 1>&4 2>&4
|
||||||
|
let rc+=$?
|
||||||
|
fi
|
||||||
|
# test $VERBOSE = true && echo
|
||||||
|
rm -f /var/run/texlive/sync-updmap*
|
||||||
|
rm -f /var/run/texlive/run-mktexlsr*
|
||||||
|
done
|
||||||
|
|
||||||
if test -x /usr/bin/mtxrun ; then
|
if test -x /usr/bin/mtxrun ; then
|
||||||
test $VERBOSE = true && echo -en "\r[ ]Generate file database."
|
test $VERBOSE = true && echo -en "\r[ ]Generate file database."
|
||||||
TEXMF=${TEXMFDIST} \
|
TEXMF=${TEXMFDIST} \
|
||||||
@ -248,7 +284,7 @@ type -p texconfig-sys &> /dev/null || exit 0
|
|||||||
# Configuration broken
|
# Configuration broken
|
||||||
#
|
#
|
||||||
if test ! -e "$TEXMFCNFFILE" ; then
|
if test ! -e "$TEXMFCNFFILE" ; then
|
||||||
echo "${0##*/}: Configuration of texlive installation not found."
|
echo "${0##*/}: Configuration of texlive installation not found." 1>&2
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -607,8 +643,5 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $VERBOSE = true ; then
|
|
||||||
exec 4>&-
|
|
||||||
fi
|
|
||||||
##
|
##
|
||||||
exit $rc
|
exit $rc
|
||||||
|
Loading…
Reference in New Issue
Block a user