[tex-live] fmtutil --byengine ?

Norbert Preining preining at logic.at
Wed Aug 12 22:55:48 CEST 2009


On Mi, 12 Aug 2009, Martin Schröder wrote:
> 2009/8/12 Dan Luecking <luecking at uark.edu>:
> > A modest feature request:
> 
> +1

I wrote "who is writing the code", the answer is: I:

Patch:
--- /src/TeX/texlive-svn/Master/bin/x86_64-linux/fmtutil	2009-06-17 10:03:03.000000000 +0200
+++ fmtutil	2009-08-12 22:52:39.000000000 +0200
@@ -454,6 +454,10 @@
           cmd=missing;;
       --refresh|-r)
           cmd=refresh;;
+      --byengine)
+          shift; cmd=byengine; arg=$1;;
+      --byengine=*)
+          cmd=byengine; arg=`echo "$1" | sed 's/--byengine=//'`; shift ;;
       --byfmt|-f)
           shift; cmd=byfmt; arg=$1;;
       --byfmt=*)
@@ -604,6 +608,8 @@
       recreate_by_fmt "$arg";;
     byhyphen)
       recreate_by_hyphenfile "$arg";;
+    byengine)
+      recreate_by_engine "$arg";;
   esac
 
   byebye
@@ -891,6 +897,26 @@
   getmatch || abort "no format depends on \`$hyphenfile'"
 }
 
+###############################################################################
+# recreate_by_engine(enginename)
+#   recreate all formats that are based on enginename
+###############################################################################
+recreate_by_engine()
+{
+  enginename=$1
+
+  match_cmd="test x\$engine = x$enginename"
+
+  # No match before the loop:
+  setmatch false
+
+  recreate_loop
+
+  # Now check if there was at least one match:
+  getmatch || abort "no format depends on engine \`$enginename'"
+}
+
+
 
 ###############################################################################
 # show_hyphen_file(format)


If someone wants to give it some testing and report that would be great!

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining at logic.at>        Vienna University of Technology
Debian Developer <preining at debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SOTTERLEY (n,)
Uncovered bit between two shops with awnings, which you have to cross
when it's raining.
			--- Douglas Adams, The Meaning of Liff


More information about the tex-live mailing list