diff options
author | Karl Berry <karl@freefriends.org> | 2014-11-20 19:08:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-11-20 19:08:47 +0000 |
commit | 06639a3f306fc1ca197aa71701c4d7920e98c1e1 (patch) | |
tree | cb46acc3304ac201b97c5e78f79b33862f7ae942 /Build | |
parent | 189826863eb3317689ed540fab5617e44c933903 (diff) |
updmap-sys.sh: prepend executable dir; fmtutil-sys.sh: doc fixes
git-svn-id: svn://tug.org/texlive/trunk@35626 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/texlive/tl_scripts/ChangeLog | 6 | ||||
-rwxr-xr-x | Build/source/texk/texlive/tl_scripts/fmtutil-sys.sh | 7 | ||||
-rwxr-xr-x | Build/source/texk/texlive/tl_scripts/fmtutil.sh | 81 | ||||
-rwxr-xr-x | Build/source/texk/texlive/tl_scripts/updmap-sys.sh | 20 |
4 files changed, 31 insertions, 83 deletions
diff --git a/Build/source/texk/texlive/tl_scripts/ChangeLog b/Build/source/texk/texlive/tl_scripts/ChangeLog index 5a221bb081c..4c165e79d72 100644 --- a/Build/source/texk/texlive/tl_scripts/ChangeLog +++ b/Build/source/texk/texlive/tl_scripts/ChangeLog @@ -1,3 +1,9 @@ +2014-11-20 Karl Berry <karl@tug.org> + + * fmtutil-sys.sh: doc fixes. + + * updmap-sys.sh: prepend directory of executable to $PATH. + 2014-11-17 Karl Berry <karl@tug.org> * fmtutil.sh: install (modified) patch from Zephyrus C, diff --git a/Build/source/texk/texlive/tl_scripts/fmtutil-sys.sh b/Build/source/texk/texlive/tl_scripts/fmtutil-sys.sh index 58f899eb454..0dde367952c 100755 --- a/Build/source/texk/texlive/tl_scripts/fmtutil-sys.sh +++ b/Build/source/texk/texlive/tl_scripts/fmtutil-sys.sh @@ -1,9 +1,7 @@ #!/bin/sh # $Id$ -# fmtutil-sys: Thomas Esser, public domain. - -# wrapper script for fmtutil with TEXMFVAR and TEXMFCONFIG set to -# TEXMFSYSVAR / TEXMFSYSCONFIG +# fmtutil-sys - arrange for fmtutil to affect system directories. +# Public domain. Originally written by Thomas Esser. test -f /bin/ksh && test -z "$RUNNING_KSH" \ && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ @@ -17,7 +15,6 @@ unset RUNNING_BSH # hack around a bug in zsh: test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' -export PATH # preferentially use subprograms from our own directory. mydir=`echo "$0" | sed 's,/[^/]*$,,'` diff --git a/Build/source/texk/texlive/tl_scripts/fmtutil.sh b/Build/source/texk/texlive/tl_scripts/fmtutil.sh index ebb6f02553a..0a80056501e 100755 --- a/Build/source/texk/texlive/tl_scripts/fmtutil.sh +++ b/Build/source/texk/texlive/tl_scripts/fmtutil.sh @@ -111,7 +111,7 @@ Optional behavior: exit successfully even if the required engine is missing, if it is included in this list --no-error-if-no-format exit successfully even if no format is selected; - used in conjunction with --byengine + e.g., used by tlmgr together with --byengine --quiet be silent --dolinks (not implemented, just for compatibility) --force (not implemented, just for compatibility) @@ -267,7 +267,7 @@ verboseMsg() { ############################################################################### # flush_msg_buffers() - Called from byebye() to print accumulated -# warning and error messages. +# error messages. # # global variable `flush_msg_buffers_called' is set true to detect # recursive calls during error/trap processing. If the redirection of @@ -278,21 +278,6 @@ flush_msg_buffers() if $flush_msg_buffers_called; then return; fi flush_msg_buffers_called=true - if $has_warnings; then - { - cat <<eof - -############################################################################### -$progname: Warnings issued! -$progname: See log files in directory: $destdir -############################################################################### -$progname: Ssummary of all \`warning' messages: -$log_warning_msg -############################################################################### -eof - } >&2 - fi - if $has_errors; then { cat <<eof @@ -316,13 +301,12 @@ eof # through trap processing, it is passed a RETURNCODE of 1, and the # program then exits with status 1. # -# If RETURNCODE is not given, the program exits with status 1 if either -# log_warning or log_failure has been called, and 0 if neither has been called. +# If RETURNCODE is not given, the program exits with status 1 if +# log_failure has been called, and 0 otherwise. # # byebye invokes flush_msg_buffers to print the messages accumulated by -# the previous calls to log_warning and log_failure. Thus, unless -# byebye is called, this flushing does not take place, and the messages -# are not reported. +# the previous calls to log_failure. Thus, unless byebye is called, +# this flushing does not take place, and the messages are not reported. # byebye() { @@ -332,32 +316,16 @@ byebye() force_error=false test -n "$1" && test "x$1" != x0 && force_error=true - if $has_errors || $has_warnings || $force_error; then - echo "$progname: Error(s) and/or warning(s) found, exiting unsuccessfully." + if $force_error; then + verboseMsg "$progname: Error(s) found, exiting unsuccessfully." cleanup 1 else - echo "$progname: No errors and no warnings, exiting successfully." + verboseMsg "$progname: No errors, exiting successfully." cleanup 0 fi } ############################################################################### -# init_log_warning() - reset the list of warning messages -# -# Usage scenario: -# init_log_warning -# ... -# log_warning -# ... -# byebye (will flush the message and exit). -# -init_log_warning() -{ - log_warning_msg= - has_warnings=false -} - -############################################################################### # init_log_failure() - reset the list of failure messages # # Usage scenario: @@ -374,24 +342,6 @@ init_log_failure() } ############################################################################### -# log_warning(WARNMSG) - report and save warning message WARNMSG, -# and set global variable has_warnings to true. -# -log_warning() -{ - echo "Warning: $@" >&2 - if test -z "$log_warning_msg"; then - log_warning_msg="$@" - else - OLDIFS=$IFS; IFS= - log_warning_msg="$log_warning_msg -$@" - IFS=$OLDIFS - fi - has_warnings=true -} - -############################################################################### # log_failure(FAILMSG) - report and save failure message FAILMSG # and set global variable has_errors to true. # @@ -474,7 +424,6 @@ main() flush_msg_buffers_called=false # avoid recursion in error/trap processing init_log_failure # must be before setupTmpDir since trap inside calls byebye - init_log_warning # ditto setupTmpDir # sets up trap for robust cleanup of tmpdir and more # mktexfmtMode: if called as mktexfmt, set to true. Will echo the @@ -839,8 +788,8 @@ run_initex() mkdir -p "$fulldestdir" if test -f "$fmtfile"; then - grep '^! ' $format.log >/dev/null 2>&1 && - log_warning "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' possibly failed." + grep '^! ' $format.log >/dev/null 2>&1 && log_failure \ + "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' had errors." # Definitely avoid user interaction for the following mv/cp commands. mv "$format.log" "$fulldestdir/$format.log" </dev/null \ @@ -883,9 +832,11 @@ run_initex() mktexupd "$fulldestdir" "$fmtfile" else log_failure "'mv $fmtfile $destfile' failed" - # remove the empty file possibly left over if a near-full file system. - log_warning "Removing partial file $destfile possibly left by mv failure ..." - rm -f $destfile || log_warning "rm -f $destfile failed." + if test -f "$destfile"; then + # remove the empty file possibly left over if a near-full file system. + verboseMsg "Removing partial file $destfile after mv failure ..." + rm -f $destfile || log_failure "rm -f $destfile failed." + fi fi else log_failure "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' failed" diff --git a/Build/source/texk/texlive/tl_scripts/updmap-sys.sh b/Build/source/texk/texlive/tl_scripts/updmap-sys.sh index edf3c9d6e74..fcf4dd9fd8e 100755 --- a/Build/source/texk/texlive/tl_scripts/updmap-sys.sh +++ b/Build/source/texk/texlive/tl_scripts/updmap-sys.sh @@ -1,9 +1,7 @@ #!/bin/sh - -# updmap-sys: Thomas Esser, public domain. - -# wrapper script for updmap with TEXMFVAR and TEXMFCONFIG set to -# TEXMFSYSVAR / TEXMFSYSCONFIG +# $Id$ +# updmap-sys - arrange for updmap to affect system directories. +# Public domain. Originally written by Thomas Esser. test -f /bin/ksh && test -z "$RUNNING_KSH" \ && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ @@ -15,16 +13,12 @@ test -f /bin/bsh && test -z "$RUNNING_BSH" \ && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } unset RUNNING_BSH -export PATH +# preferentially use subprograms from our own directory. +mydir=`echo "$0" | sed 's,/[^/]*$,,'` +mydir=`cd "$mydir" && pwd` +PATH="$mydir:$PATH"; export PATH # hack around a bug in zsh: test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' -# v=`kpsewhich -var-value TEXMFSYSVAR` -# c=`kpsewhich -var-value TEXMFSYSCONFIG` - -# TEXMFVAR="$v" -# TEXMFCONFIG="$c" -# export TEXMFVAR TEXMFCONFIG - exec updmap --sys ${1+"$@"} |