summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-07-04 12:21:30 +0000
committerNorbert Preining <preining@logic.at>2010-07-04 12:21:30 +0000
commit2ab9ce799cc571ca03b80c3a2afc23d6cf26e0ee (patch)
treee161071be4cee66b25b6cb380c1999f463d4e9cc
parent2b1f982a7aeb06772106cb1071a632473dc12b69 (diff)
fmtutil: add --no-error-if-no-format, don't abort in some cases of
missing formats git-svn-id: svn://tug.org/texlive/trunk@19222 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/tetex/ChangeLog5
-rwxr-xr-xBuild/source/texk/tetex/fmtutil20
2 files changed, 23 insertions, 2 deletions
diff --git a/Build/source/texk/tetex/ChangeLog b/Build/source/texk/tetex/ChangeLog
index 7e9afabc113..476452b6c0c 100644
--- a/Build/source/texk/tetex/ChangeLog
+++ b/Build/source/texk/tetex/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-04 Norbert Preining <preining@logic.at>
+
+ * fmtutil: add --no-error-if-no-format, don't abort in some cases of
+ missing formats
+
2010-06-12 Karl Berry <karl@tug.org>
* fmtutil (--edit): disable.
diff --git a/Build/source/texk/tetex/fmtutil b/Build/source/texk/tetex/fmtutil
index a1be58baa5c..0e1244e287f 100755
--- a/Build/source/texk/tetex/fmtutil
+++ b/Build/source/texk/tetex/fmtutil
@@ -104,6 +104,8 @@ Optional behavior:
--cnffile FILE read FILE instead of fmtutil.cnf.
--fmtdir DIRECTORY
--no-engine-subdir don't use engine-specific subdir of the fmtdir
+ --no-error-if-no-format do not exit with error code on some format
+ related errors
--quiet be silent
--test (not implemented, just for compatibility)
--dolinks (not implemented, just for compatibility)
@@ -247,6 +249,17 @@ abort()
}
###############################################################################
+# maybe_abort(errmsg)
+# print `errmsg' to stderr and
+# unless noAbortFlag is set exit with error code 1
+###############################################################################
+maybe_abort()
+{
+ echo "$progname: $1." >&2
+ $noAbortFlag || cleanup 1
+}
+
+###############################################################################
# verboseMsg(msg)
# print `msg' to stderr is $verbose is true
###############################################################################
@@ -409,6 +422,7 @@ main()
cfgmaint=
tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
verboseFlag=true
+ noAbortFlag=false
# mktexfmtMode: if called as mktexfmt, set to true. Will echo the
# first generated filename after successful generation to stdout then
@@ -485,6 +499,8 @@ main()
cmd=catcfg;;
--listcfg)
cmd=listcfg;;
+ --no-error-if-no-format)
+ noAbortFlag=true;;
--quiet|-q|--silent)
verboseFlag=false;;
--test|--dolinks|--force)
@@ -922,7 +938,7 @@ recreate_by_hyphenfile()
recreate_loop
# Now check if there was at least one match:
- getmatch || abort "no format depends on hyphen file \`$hyphenfile'"
+ getmatch || maybe_abort "no format depends on hyphen file \`$hyphenfile'"
}
###############################################################################
@@ -941,7 +957,7 @@ recreate_by_engine()
recreate_loop
# Now check if there was at least one match:
- getmatch || abort "no format depends on engine \`$enginename'"
+ getmatch || maybe_abort "no format depends on engine \`$enginename'"
}