diff options
author | Norbert Preining <preining@logic.at> | 2012-05-21 04:22:56 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2012-05-21 04:22:56 +0000 |
commit | 427fc445850661fff6a8f8471ce765e9a24f9ad5 (patch) | |
tree | 1a693e950eb57445db557c4536bafdd599a9ec40 /Master/tlpkg/bin/tl-dump-texcatalogue | |
parent | 949c8ab9cfbc9cb341d543d94bf049eb4466d6c4 (diff) |
split out the reading of TeX Catalogue from the update of tlpdb
(to be resistent against TC errors):
- new script: tl-dump-texcatalogue that reads from ARGV[0] and dumps to stdout
- tl-update-tlpdb:
. read catalogue data from Master/texmf/scripts/texlive/var/texcatalogue.data
. if this file is not found, reuse the already present catalogue data
(instead of dropping all data)
- tl-update-auto: update Master/texmf/scripts/texlive/var/texcatalogue.data
git-svn-id: svn://tug.org/texlive/trunk@26533 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-dump-texcatalogue')
-rwxr-xr-x | Master/tlpkg/bin/tl-dump-texcatalogue | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Master/tlpkg/bin/tl-dump-texcatalogue b/Master/tlpkg/bin/tl-dump-texcatalogue new file mode 100755 index 00000000000..c410397aa7a --- /dev/null +++ b/Master/tlpkg/bin/tl-dump-texcatalogue @@ -0,0 +1,37 @@ +#!/usr/bin/env perl +# $Id$ +# Copyright 2012 Norbert Preining +# This file is licensed under the GNU General Public License version 2 +# or any later version. +# +# Write a parsable representation of the catalogue to stdout +# run from cron.tl + +BEGIN { + $^W = 1; + chomp ($mydir = `dirname $0`); + unshift (@INC, "$mydir/.."); +} + +use strict; +$^W = 1; +use Data::Dumper; +use TeXLive::TeXCatalogue; + +exit (&main ()); + +sub main { + if (@ARGV != 1) { + die "Usage: $0 /PATH/TO/CATALOGUE\n"; + } + + my $texcatalogue = TeXLive::TeXCatalogue->new(location => $ARGV[0]); + + $Data::Dumper::Indent = 1; + $Data::Dumper::Sortkeys = 1; # stable output + $Data::Dumper::Purity = 1; # recursive structures must be safe + print Data::Dumper->Dump([\$texcatalogue], [qw(tlc)]); + + return 0; +} + |