texlive[58847] Master/texmf-dist/scripts/texlive/fmtutil.pl: fmtutil:
commits+preining at tug.org
commits+preining at tug.org
Mon Apr 12 03:00:22 CEST 2021
Revision: 58847
http://tug.org/svn/texlive?view=revision&revision=58847
Author: preining
Date: 2021-04-12 03:00:22 +0200 (Mon, 12 Apr 2021)
Log Message:
-----------
fmtutil: make --refresh an option usable with other format selection commands
Modified Paths:
--------------
trunk/Master/texmf-dist/scripts/texlive/fmtutil.pl
Modified: trunk/Master/texmf-dist/scripts/texlive/fmtutil.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/fmtutil.pl 2021-04-12 01:00:14 UTC (rev 58846)
+++ trunk/Master/texmf-dist/scripts/texlive/fmtutil.pl 2021-04-12 01:00:22 UTC (rev 58847)
@@ -3,7 +3,7 @@
# fmtutil - utility to maintain format files.
# (Maintained in TeX Live:Master/texmf-dist/scripts/texlive.)
#
-# Copyright 2014-2020 Norbert Preining
+# Copyright 2014-2021 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -103,7 +103,6 @@
my @cmdline_cmds = ( # in same order as help message
"all",
"missing",
- "refresh",
"byengine=s",
"byfmt=s",
"byhyphen=s",
@@ -123,6 +122,7 @@
"no-error-if-no-format",
"nohash",
"recorder",
+ "refresh",
"strict!",
"quiet|silent|q",
"catcfg",
@@ -202,8 +202,16 @@
. "Try $prg --help if you need it.\n");
return 1;
} elsif (@cmds == 0) {
- print_error("no command specified; try $prg --help if you need it.\n");
- return 1;
+ if ($opts{'refresh'}) {
+ # backward compatibility: till 2021 we had --refresh as a command
+ # but now we allow combining it with --byfmt etc
+ # In case that --refresh was given without any other command, we
+ # treat it as --all --refresh as it was the case till the change.
+ $opts{'all'} = 1;
+ } else {
+ print_error("no command specified; try $prg --help if you need it.\n");
+ return 1;
+ }
}
}
@@ -288,9 +296,6 @@
} elsif ($opts{'byhyphen'}) {
return callback_build_formats('byhyphen', $opts{'byhyphen'});
- } elsif ($opts{'refresh'}) {
- return callback_build_formats('refresh');
-
} elsif ($opts{'missing'}) {
return callback_build_formats('missing');
@@ -473,6 +478,12 @@
$doit = 1 if ($what eq 'missing' && ! -r "$destdir/$fmtfile");
$doit = 1 if ($what eq 'byengine' && $eng eq $whatarg);
$doit = 1 if ($what eq 'byfmt' && $fmt eq $whatarg);
+ #
+ # Deal with the --refresh option
+ # 2021 changed behavior that --refresh can be used with all other format
+ # selection cmd line args.
+ $doit = 0 if ($opts{'refresh'} && ! -r "$destdir/$fmtfile");
+ #
# TODO
# original fmtutil.sh was stricter about existence of the hyphen file
# not sure how we proceed here; let's implicitly ignore.
@@ -1338,6 +1349,7 @@
--no-strict exit successfully even if a format fails to build
--nohash don't update ls-R files
--recorder pass the -recorder option and save .fls files
+ --refresh recreate only existing format files
--quiet be silent
--catcfg (does nothing, exists for compatibility)
--dolinks (does nothing, exists for compatibility)
@@ -1347,7 +1359,6 @@
Commands:
--all recreate all format files
--missing create all missing format files
- --refresh recreate only existing format files
--byengine ENGINE (re)create formats built with ENGINE
--byfmt FORMAT (re)create format FORMAT
--byhyphen HYPHENFILE (re)create formats that depend on HYPHENFILE
More information about the tex-live-commits
mailing list.