summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-05-31 11:55:10 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-05-31 11:55:10 +0000
commit2e29be81b9ee04c3c194ef698fc789d40578dc34 (patch)
tree7a42cf57fbc9c881c7d52130dbc9f5f4df135c2c
parentaeac1d705a8adf313891d96be54261e384e9ca5d (diff)
Allow multiple language files in fmtutil.cnf.
git-svn-id: svn://tug.org/texlive/trunk@18642 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/tetex/ChangeLog4
-rwxr-xr-xBuild/source/texk/tetex/fmtutil8
-rw-r--r--Build/source/texk/tetex/fmtutil.cnf.54
-rwxr-xr-xMaster/bin/alpha-linux/fmtutil8
-rwxr-xr-xMaster/bin/amd64-freebsd/fmtutil8
-rwxr-xr-xMaster/bin/amd64-kfreebsd/fmtutil8
-rwxr-xr-xMaster/bin/i386-cygwin/fmtutil8
-rwxr-xr-xMaster/bin/i386-freebsd/fmtutil8
-rwxr-xr-xMaster/bin/i386-kfreebsd/fmtutil8
-rwxr-xr-xMaster/bin/i386-linux/fmtutil8
-rwxr-xr-xMaster/bin/i386-netbsd/fmtutil8
-rwxr-xr-xMaster/bin/i386-solaris/fmtutil8
-rwxr-xr-xMaster/bin/mips-irix/fmtutil56
-rwxr-xr-xMaster/bin/powerpc-aix/fmtutil56
-rwxr-xr-xMaster/bin/powerpc-linux/fmtutil8
-rwxr-xr-xMaster/bin/sparc-linux/fmtutil8
-rwxr-xr-xMaster/bin/sparc-solaris/fmtutil56
-rwxr-xr-xMaster/bin/universal-darwin/fmtutil8
-rwxr-xr-xMaster/bin/x86_64-darwin/fmtutil8
-rwxr-xr-xMaster/bin/x86_64-linux/fmtutil8
-rwxr-xr-xMaster/bin/x86_64-solaris/fmtutil8
21 files changed, 173 insertions, 131 deletions
diff --git a/Build/source/texk/tetex/ChangeLog b/Build/source/texk/tetex/ChangeLog
index 1a7c7c6be7d..535ed5d2e30 100644
--- a/Build/source/texk/tetex/ChangeLog
+++ b/Build/source/texk/tetex/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-31 Manuel Pégourié-Gonnard <mpg@elzevir.fr>
+
+ * fmtutil: allow more than one language file per format.
+
2010-05-20 Karl Berry <karl@tug.org>
* doc/TETEXDOC.dvi,
diff --git a/Build/source/texk/tetex/fmtutil b/Build/source/texk/tetex/fmtutil
index c29237e3fb3..025cece5568 100755
--- a/Build/source/texk/tetex/fmtutil
+++ b/Build/source/texk/tetex/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Build/source/texk/tetex/fmtutil.cnf.5 b/Build/source/texk/tetex/fmtutil.cnf.5
index 7c5aeb905d2..e00b537a261 100644
--- a/Build/source/texk/tetex/fmtutil.cnf.5
+++ b/Build/source/texk/tetex/fmtutil.cnf.5
@@ -15,7 +15,7 @@ arguments (name of an \fI\&.ini\fP file)\&.
Fields are separated by whitespace\& and complete lines can be commented
out with ``#\'\'\&. The ``pattern file\'\' field cannot be used to
define a file that is used while building the format\&.
-It tells \fBfmtutil\fP which file the
+It tells \fBfmtutil\fP which files (separated by comas) the
format creation procedure reads\& and it has an effect to the options
\fI--showhyphen\fP and \fI--byhyphen\fP\&.
If the format has no way to
@@ -49,6 +49,8 @@ default configuration file
hyphenation pattern file
.IP "\fIlanguage\&.def\fP"
hyphenation pattern file
+.IP "\fIlanguage\&.dat.lua\fP"
+hyphenation pattern file
.PP
.SH "SEE ALSO"
.PP
diff --git a/Master/bin/alpha-linux/fmtutil b/Master/bin/alpha-linux/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/alpha-linux/fmtutil
+++ b/Master/bin/alpha-linux/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/amd64-freebsd/fmtutil b/Master/bin/amd64-freebsd/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/amd64-freebsd/fmtutil
+++ b/Master/bin/amd64-freebsd/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/amd64-kfreebsd/fmtutil b/Master/bin/amd64-kfreebsd/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/amd64-kfreebsd/fmtutil
+++ b/Master/bin/amd64-kfreebsd/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/i386-cygwin/fmtutil b/Master/bin/i386-cygwin/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/i386-cygwin/fmtutil
+++ b/Master/bin/i386-cygwin/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/i386-freebsd/fmtutil b/Master/bin/i386-freebsd/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/i386-freebsd/fmtutil
+++ b/Master/bin/i386-freebsd/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/i386-kfreebsd/fmtutil b/Master/bin/i386-kfreebsd/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/i386-kfreebsd/fmtutil
+++ b/Master/bin/i386-kfreebsd/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/i386-linux/fmtutil b/Master/bin/i386-linux/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/i386-linux/fmtutil
+++ b/Master/bin/i386-linux/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/i386-netbsd/fmtutil b/Master/bin/i386-netbsd/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/i386-netbsd/fmtutil
+++ b/Master/bin/i386-netbsd/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/i386-solaris/fmtutil b/Master/bin/i386-solaris/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/i386-solaris/fmtutil
+++ b/Master/bin/i386-solaris/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/mips-irix/fmtutil b/Master/bin/mips-irix/fmtutil
index f12885629e2..2cb5743a463 100755
--- a/Master/bin/mips-irix/fmtutil
+++ b/Master/bin/mips-irix/fmtutil
@@ -1,6 +1,7 @@
#!/bin/sh
# fmtutil - utility to maintain format files.
# Public domain. Originally written by Thomas Esser.
+# Run with --help for usage.
# program history:
# further changes in texk/tetex/ChangeLog.
@@ -58,7 +59,7 @@ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
progname=fmtutil
argv0=$0
-version=20091223.1047
+version='$Id: fmtutil 17423 2010-03-11 17:53:34Z karl $'
cnf=fmtutil.cnf # name of the config file
export PATH
@@ -82,13 +83,24 @@ cleanup()
###############################################################################
help()
{
- cat <<'eof'
+ cat <<eof
+$version
Usage: fmtutil [OPTION]... CMD [ARG]...
+Usage: mktexfmt FMT.fmt|BASE.base|MEM.mem|FMTNAME
+
+Rebuild and manage TeX formats (and Metafont bases and MetaPost mems).
+
+If the command name ends in mktexfmt, only one format can be created.
+The only options supported are --help and --version, and the command
+line must consist of either a format name, with its extension, or a
+plain name that is passed as the argument to --byfmt (see below). The
+full name of the generated file (if any) is written to stdout, and
+nothing else.
-Rebuild, manage, and otherwise manipulate TeX formats (and Metafont
-bases and MetaPost mems).
+If not operating in mktexfmt mode, the command line can be more general,
+and multiple formats can be generated, as follows.
-Valid options:
+Valid options for fmtutil:
--cnffile FILE
--fmtdir DIRECTORY
--no-engine-subdir don't use engine-specific subdir of the fmtdir
@@ -97,7 +109,7 @@ Valid options:
--dolinks (not implemented, just for compatibility)
--force (not implemented, just for compatibility)
-Valid commands:
+Valid commands for fmtutil:
--all recreate all format files
--missing create all missing format files
--refresh recreate only existing format files
@@ -116,6 +128,9 @@ Valid commands:
The config file is named fmtutil.cnf, and
running kpsewhich fmtutil.cnf should show the active file.
+
+Report bugs to: tex-k@tug.org
+TeX Live home page: <http://tug.org/texlive/>
eof
cleanup 0
}
@@ -398,18 +413,15 @@ main()
mktexfmtMode=true
fullfmt=$1; shift
case $fullfmt in
+ ""|--help) help ;;
+ --version) version ;;
+ --*) abort "unknown option $fullfmt, try --help" ;;
*.fmt|*.mem|*.base)
- set x --byfmt `echo $fullfmt | sed 's@\.[a-z]*$@@'` ${1+"$@"}; shift
- ;;
- *.*)
- abort "unknown format type: $fullfmt"
- ;;
- "")
- help
- ;;
- *)
- set x --byfmt $fullfmt; shift
- ;;
+ set x --byfmt `echo $fullfmt | sed 's@\.[a-z]*$@@'` ${1+"$@"}
+ shift
+ ;;
+ *.*) abort "unknown format type: $fullfmt" ;;
+ *) set x --byfmt $fullfmt; shift ;;
esac
;;
esac
@@ -482,7 +494,7 @@ main()
esac
if test -n "$cfgparam"; then
- test -f "$cnf_file" || abort "config file \`$cnf_file' not found"
+ test -f "$cnf_file" || abort "config file \`$cnf_file' not found (ls-R missing?)"
fi
if test -n "$cfgmaint"; then
@@ -660,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -830,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -897,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/powerpc-aix/fmtutil b/Master/bin/powerpc-aix/fmtutil
index f12885629e2..2cb5743a463 100755
--- a/Master/bin/powerpc-aix/fmtutil
+++ b/Master/bin/powerpc-aix/fmtutil
@@ -1,6 +1,7 @@
#!/bin/sh
# fmtutil - utility to maintain format files.
# Public domain. Originally written by Thomas Esser.
+# Run with --help for usage.
# program history:
# further changes in texk/tetex/ChangeLog.
@@ -58,7 +59,7 @@ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
progname=fmtutil
argv0=$0
-version=20091223.1047
+version='$Id: fmtutil 17423 2010-03-11 17:53:34Z karl $'
cnf=fmtutil.cnf # name of the config file
export PATH
@@ -82,13 +83,24 @@ cleanup()
###############################################################################
help()
{
- cat <<'eof'
+ cat <<eof
+$version
Usage: fmtutil [OPTION]... CMD [ARG]...
+Usage: mktexfmt FMT.fmt|BASE.base|MEM.mem|FMTNAME
+
+Rebuild and manage TeX formats (and Metafont bases and MetaPost mems).
+
+If the command name ends in mktexfmt, only one format can be created.
+The only options supported are --help and --version, and the command
+line must consist of either a format name, with its extension, or a
+plain name that is passed as the argument to --byfmt (see below). The
+full name of the generated file (if any) is written to stdout, and
+nothing else.
-Rebuild, manage, and otherwise manipulate TeX formats (and Metafont
-bases and MetaPost mems).
+If not operating in mktexfmt mode, the command line can be more general,
+and multiple formats can be generated, as follows.
-Valid options:
+Valid options for fmtutil:
--cnffile FILE
--fmtdir DIRECTORY
--no-engine-subdir don't use engine-specific subdir of the fmtdir
@@ -97,7 +109,7 @@ Valid options:
--dolinks (not implemented, just for compatibility)
--force (not implemented, just for compatibility)
-Valid commands:
+Valid commands for fmtutil:
--all recreate all format files
--missing create all missing format files
--refresh recreate only existing format files
@@ -116,6 +128,9 @@ Valid commands:
The config file is named fmtutil.cnf, and
running kpsewhich fmtutil.cnf should show the active file.
+
+Report bugs to: tex-k@tug.org
+TeX Live home page: <http://tug.org/texlive/>
eof
cleanup 0
}
@@ -398,18 +413,15 @@ main()
mktexfmtMode=true
fullfmt=$1; shift
case $fullfmt in
+ ""|--help) help ;;
+ --version) version ;;
+ --*) abort "unknown option $fullfmt, try --help" ;;
*.fmt|*.mem|*.base)
- set x --byfmt `echo $fullfmt | sed 's@\.[a-z]*$@@'` ${1+"$@"}; shift
- ;;
- *.*)
- abort "unknown format type: $fullfmt"
- ;;
- "")
- help
- ;;
- *)
- set x --byfmt $fullfmt; shift
- ;;
+ set x --byfmt `echo $fullfmt | sed 's@\.[a-z]*$@@'` ${1+"$@"}
+ shift
+ ;;
+ *.*) abort "unknown format type: $fullfmt" ;;
+ *) set x --byfmt $fullfmt; shift ;;
esac
;;
esac
@@ -482,7 +494,7 @@ main()
esac
if test -n "$cfgparam"; then
- test -f "$cnf_file" || abort "config file \`$cnf_file' not found"
+ test -f "$cnf_file" || abort "config file \`$cnf_file' not found (ls-R missing?)"
fi
if test -n "$cfgmaint"; then
@@ -660,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -830,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -897,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/powerpc-linux/fmtutil b/Master/bin/powerpc-linux/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/powerpc-linux/fmtutil
+++ b/Master/bin/powerpc-linux/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/sparc-linux/fmtutil b/Master/bin/sparc-linux/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/sparc-linux/fmtutil
+++ b/Master/bin/sparc-linux/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/sparc-solaris/fmtutil b/Master/bin/sparc-solaris/fmtutil
index f12885629e2..2cb5743a463 100755
--- a/Master/bin/sparc-solaris/fmtutil
+++ b/Master/bin/sparc-solaris/fmtutil
@@ -1,6 +1,7 @@
#!/bin/sh
# fmtutil - utility to maintain format files.
# Public domain. Originally written by Thomas Esser.
+# Run with --help for usage.
# program history:
# further changes in texk/tetex/ChangeLog.
@@ -58,7 +59,7 @@ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
progname=fmtutil
argv0=$0
-version=20091223.1047
+version='$Id: fmtutil 17423 2010-03-11 17:53:34Z karl $'
cnf=fmtutil.cnf # name of the config file
export PATH
@@ -82,13 +83,24 @@ cleanup()
###############################################################################
help()
{
- cat <<'eof'
+ cat <<eof
+$version
Usage: fmtutil [OPTION]... CMD [ARG]...
+Usage: mktexfmt FMT.fmt|BASE.base|MEM.mem|FMTNAME
+
+Rebuild and manage TeX formats (and Metafont bases and MetaPost mems).
+
+If the command name ends in mktexfmt, only one format can be created.
+The only options supported are --help and --version, and the command
+line must consist of either a format name, with its extension, or a
+plain name that is passed as the argument to --byfmt (see below). The
+full name of the generated file (if any) is written to stdout, and
+nothing else.
-Rebuild, manage, and otherwise manipulate TeX formats (and Metafont
-bases and MetaPost mems).
+If not operating in mktexfmt mode, the command line can be more general,
+and multiple formats can be generated, as follows.
-Valid options:
+Valid options for fmtutil:
--cnffile FILE
--fmtdir DIRECTORY
--no-engine-subdir don't use engine-specific subdir of the fmtdir
@@ -97,7 +109,7 @@ Valid options:
--dolinks (not implemented, just for compatibility)
--force (not implemented, just for compatibility)
-Valid commands:
+Valid commands for fmtutil:
--all recreate all format files
--missing create all missing format files
--refresh recreate only existing format files
@@ -116,6 +128,9 @@ Valid commands:
The config file is named fmtutil.cnf, and
running kpsewhich fmtutil.cnf should show the active file.
+
+Report bugs to: tex-k@tug.org
+TeX Live home page: <http://tug.org/texlive/>
eof
cleanup 0
}
@@ -398,18 +413,15 @@ main()
mktexfmtMode=true
fullfmt=$1; shift
case $fullfmt in
+ ""|--help) help ;;
+ --version) version ;;
+ --*) abort "unknown option $fullfmt, try --help" ;;
*.fmt|*.mem|*.base)
- set x --byfmt `echo $fullfmt | sed 's@\.[a-z]*$@@'` ${1+"$@"}; shift
- ;;
- *.*)
- abort "unknown format type: $fullfmt"
- ;;
- "")
- help
- ;;
- *)
- set x --byfmt $fullfmt; shift
- ;;
+ set x --byfmt `echo $fullfmt | sed 's@\.[a-z]*$@@'` ${1+"$@"}
+ shift
+ ;;
+ *.*) abort "unknown format type: $fullfmt" ;;
+ *) set x --byfmt $fullfmt; shift ;;
esac
;;
esac
@@ -482,7 +494,7 @@ main()
esac
if test -n "$cfgparam"; then
- test -f "$cnf_file" || abort "config file \`$cnf_file' not found"
+ test -f "$cnf_file" || abort "config file \`$cnf_file' not found (ls-R missing?)"
fi
if test -n "$cfgmaint"; then
@@ -660,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -830,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -897,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/universal-darwin/fmtutil b/Master/bin/universal-darwin/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/universal-darwin/fmtutil
+++ b/Master/bin/universal-darwin/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/x86_64-darwin/fmtutil b/Master/bin/x86_64-darwin/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/x86_64-darwin/fmtutil
+++ b/Master/bin/x86_64-darwin/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/x86_64-linux/fmtutil b/Master/bin/x86_64-linux/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/x86_64-linux/fmtutil
+++ b/Master/bin/x86_64-linux/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false
diff --git a/Master/bin/x86_64-solaris/fmtutil b/Master/bin/x86_64-solaris/fmtutil
index 6257aba50e7..2cb5743a463 100755
--- a/Master/bin/x86_64-solaris/fmtutil
+++ b/Master/bin/x86_64-solaris/fmtutil
@@ -672,10 +672,10 @@ parse_line()
###############################################################################
find_hyphenfile()
{
- format="$1"; hyphenation="$2"
+ format="$1"; hyphenation="`echo $2 | sed 's/,/ /g'`"
case $hyphenation in
-) ;;
- *) kpsewhich -progname="$format" -format=tex "$hyphenation";;
+ *) kpsewhich -progname="$format" -format=tex $hyphenation;;
esac
}
@@ -842,7 +842,7 @@ listcfg_loop()
check_match()
{
$need_find_hyphenfile && \
- this_hyphenfile=`find_hyphenfile "$format" "$hyphenation"`
+ this_hyphenfile="`find_hyphenfile "$format" "$hyphenation"`"
eval $match_cmd && setmatch true
}
@@ -909,7 +909,7 @@ recreate_by_hyphenfile()
;;
esac
need_find_hyphenfile=true
- match_cmd="test x\$this_hyphenfile = x$hyphenfile"
+ match_cmd="echo \"\$this_hyphenfile\" | grep $hyphenfile >/dev/null"
# No match before the loop:
setmatch false