diff options
Diffstat (limited to 'new-infra/create-tldb.pl')
-rw-r--r-- | new-infra/create-tldb.pl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/new-infra/create-tldb.pl b/new-infra/create-tldb.pl new file mode 100644 index 00000000000..0a068e835bb --- /dev/null +++ b/new-infra/create-tldb.pl @@ -0,0 +1,33 @@ +use TLSRC; +use TLP; +use TLDB; +use TLTREE; +# create tltree from everything under new-infra +my $tltree = TLTREE->new( 'svnroot' => "/src/TeX/texlive-svn/new-infra"); +# init it from svn status -v +$tltree->init_from_svn; + +# create an empty TLDB; +my $tldb = TLDB->new; + +# create tlps for all tlsrc/*.tlsrc +foreach my $f (<tlsrc/*.tlsrc>) { + my $tlsrc = new TLSRC; + # read the specification from a the .tlsrc file + $tlsrc->from_file($f); + # create the tlp, for this we need the $tltree + my $tlp = $tlsrc->make_tlp($tltree); + # add the $tlp to the TLDB + $tldb->add_tlp($tlp); + # in addition, write it out to a file + my $name = $tlp->name; + open(FOO,">tlp/$name.tlp"); + $tlp->writeout(\*FOO); + close(FOO); +} + +# finish by writing out the TLDB +open(TMP,">test.tldb"); +$tldb->writeout(\*TMP); +close(TMP); + |