From 53a26794bcb05cffe6c83f21c3413d62c41f6c4a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 13 Jan 2007 23:00:58 +0000 Subject: echo only one line of output git-svn-id: svn://tug.org/texlive/trunk@3437 c570f23f-e606-0410-a88d-b1316a301751 --- Master/bin/i386-freebsd/fmtutil | 80 +++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 39 deletions(-) (limited to 'Master/bin/i386-freebsd') diff --git a/Master/bin/i386-freebsd/fmtutil b/Master/bin/i386-freebsd/fmtutil index e061f4f20af..ae04f067201 100755 --- a/Master/bin/i386-freebsd/fmtutil +++ b/Master/bin/i386-freebsd/fmtutil @@ -24,10 +24,12 @@ # Options: # --cnffile file set configfile for fmtutil # --fmtdir directory set destination directory for format files +# --no-engine-subdir don't use $engine subdirectory of the fmtdir ############################################################################### ############################################################################### # program history: +# 2007-01-04 patch by JK to support $engine subdir (enabled by default) # Fr Apr 8 19:15:05 CEST 2005 cleanup now has an argument for the return code # Do Mar 02 10:42:31 CET 2006 add tmpdir to TEXFORMATS # So Mär 27 18:52:06 CEST 2005 honor $TMPDIR, $TEMP and $TMP, not just $TMP @@ -81,7 +83,7 @@ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' progname=fmtutil argv0=$0 -version=1112981053 # seconds since `00:00:00 1970-01-01 UTC' +version=1168729197 # seconds since `00:00:00 1970-01-01 UTC' # date '+%s' (with GNU date) cnf=fmtutil.cnf # name of the config file @@ -198,6 +200,7 @@ Usage: fmtutil [option] ... cmd [argument] Valid options: --cnffile file --fmtdir directory + --no-engine-subdir don't use engine-specific subdir of the fmtdir --quiet (not implemented, just for compatibility) --test (not implemented, just for compatibility) --dolinks (not implemented, just for compatibility) @@ -359,8 +362,9 @@ main() tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$ verboseFlag=true - # mktexfmtMode: if called as mktexfmt, set to true. Will echo the generated - # filename after successful generation to stdout then (and nothing else). + # mktexfmtMode: if called as mktexfmt, set to true. Will echo the + # first generated filename after successful generation to stdout then + # (and nothing else), since kpathsea can only deal with one. mktexfmtMode=false case $argv0 in mktexfmt|*/mktexfmt) @@ -383,6 +387,7 @@ main() ;; esac + use_engine_dir=true # whether to use web2c/$engine subdirs while case $1 in --cnffile) @@ -393,6 +398,8 @@ main() shift; destdir=$1;; --fmtdir=*) destdir=`echo "$1" | sed 's/--fmtdir=//'`; shift ;; + --no-engine-subdir) + use_engine_dir=false;; --all|-a) cmd=all;; --edit|-e) @@ -547,31 +554,11 @@ main() refresh) recreate_existing;; byfmt) - create_one_format "$arg";; + recreate_by_fmt "$arg";; byhyphen) recreate_by_hyphenfile "$arg";; esac - # install the log files and format files: - for i in *.log; do - test -f "$i" || continue - rm -f "$destdir/$i" - - # We don't want user-interaction for the following "mv" command: - mv "$i" "$destdir/$i" /dev/null 2>&1 && log_failure "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' possibly failed." + rm -f "$fulldestdir/$format.log" + # We don't want user-interaction for the following "mv" commands: + mv "$format.log" "$fulldestdir/$format.log" /dev/null || { (exit 0); return 0; } ed $cnf_file >/dev/null 2>&1 <<-eof - /^$1[ ]/s/^/#! / + g/^$1[ ]/s/^/#! / w q eof @@ -877,7 +879,7 @@ enablefmt() { grep "^#![ ]*$1[ ]" $cnf_file >/dev/null || { (exit 0); return 0; } ed $cnf_file >/dev/null 2>&1 <<-eof - /^#![ ]*$1[ ]/s/..[ ]*// + g/^#![ ]*$1[ ]/s/..[ ]*// w q eof -- cgit v1.2.3