summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/check-fmttriggers
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/bin/check-fmttriggers')
-rwxr-xr-xMaster/tlpkg/bin/check-fmttriggers37
1 files changed, 25 insertions, 12 deletions
diff --git a/Master/tlpkg/bin/check-fmttriggers b/Master/tlpkg/bin/check-fmttriggers
index 6241b257468..50fffe8b225 100755
--- a/Master/tlpkg/bin/check-fmttriggers
+++ b/Master/tlpkg/bin/check-fmttriggers
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# $Id: check-files-by-format 36922 2015-04-18 22:40:06Z karl $
+# $Id$
# Originally written by Norbert Preining and Karl Berry, 2015. Public domain.
#
# Determine the files on which each format (fmt/base) depends
@@ -8,12 +8,13 @@
# then check that exactly those packages are listed as triggers in the
# corresponding tlpsrc files.
-my ($tlroot, $Master);
+my ($vc_id, $Master);
BEGIN {
+ $vc_id = '$Id$';
$^W = 1;
- ($mydir = $0) =~ s,/[^/]*$,,;
- $tlroot = "$mydir/../..";
+ (my $mydir = $0) =~ s,/[^/]*$,,;
+ my $tlroot = "$mydir/../..";
unshift (@INC, "$tlroot/tlpkg");
chomp ($Master = `cd $mydir/../.. && pwd`);
}
@@ -30,12 +31,20 @@ my $prg = TeXLive::TLUtils::basename($0);
my $opt_fmtdir = "/tmp/fmttriggers";
my $opt_rerecord = 1;
my $opt_help = 0;
+my $opt_version = 0;
TeXLive::TLUtils::process_logging_options ();
-GetOptions ("fmtdir" => \$opt_fmtdir,
- "rerecord!" => \$opt_rerecord,
- "help|?" => \$help) or pod2usage(1);
-pod2usage (-exitstatus => 0, -verbose => 2) if $help;
+GetOptions (
+ "fmtdir" => \$opt_fmtdir,
+ "rerecord!" => \$opt_rerecord,
+ "version" => \$opt_version,
+ "help|?" => \$help) || pod2usage(1);
+
+pod2usage ("-exitstatus" => 0, "-verbose" => 2) if $help;
+if ($opt_version) { print "$vc_id\n"; exit 0; }
+
+$::installerdir = $Master; # TLUtils.pm should be smarter
+$ENV{'PATH'} = "$Master/bin/" . TeXLive::TLUtils::platform() . ":$ENV{PATH}";
exit (&main());
@@ -331,20 +340,24 @@ check-fmt-trigger [I<option>]...
=over 4
-=item C<--fmtdir> I<dir>
+=item B<--fmtdir> I<dir>
Rebuild formats in I<dir>; default C</tmp/fmttriggers>. This directory
is completely removed before rebuilding, so do not use any system
directory.
-=item C<--no-rerecord>
+=item B<--no-rerecord>
Do not rebuild all formats to remake the recorder files; the default
(C<--rerecord>) is to do so.
-=item C<--help>
+=item B<--help>
+
+Display this documentation and exit.
+
+=item B<--version>
-Print this documentation and exit.
+Display version information and exit.
=back