summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-10-28 23:50:25 +0000
committerNorbert Preining <preining@logic.at>2008-10-28 23:50:25 +0000
commit395b98a9ece78fb75fe68b8182a4992f83cabef4 (patch)
tree6a62ffc661fbfe5d5ece732be7ada05ae5ae39fa /Master/tlpkg/bin
parent477195e9a79a9f1339a0eb0f5f27116a3e41086d (diff)
move some scripts to tlpkg/archive
git-svn-id: svn://tug.org/texlive/trunk@11096 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-xMaster/tlpkg/bin/tlpdb2container160
-rwxr-xr-xMaster/tlpkg/bin/tlpdb2list86
-rwxr-xr-xMaster/tlpkg/bin/tlpsrc2container176
-rwxr-xr-xMaster/tlpkg/bin/tlpsrc2tlpobj128
4 files changed, 0 insertions, 550 deletions
diff --git a/Master/tlpkg/bin/tlpdb2container b/Master/tlpkg/bin/tlpdb2container
deleted file mode 100755
index e40473b68d4..00000000000
--- a/Master/tlpkg/bin/tlpdb2container
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env perl
-# $Id: tlpdb2container 5188 2007-10-14 20:32:44Z karl $
-# Copyright 2007 Norbert Preining
-# This file is licensed under the GNU General Public License version 2
-# or any later version.
-#
-# Generate a zip file for the packages specified on the cmdline, or
-# for -all
-
-BEGIN {
- $^W = 1;
- ($mydir = $0) =~ s,/[^/]*$,,;
- unshift (@INC, "$mydir/..");
-}
-
-use strict;
-
-use TeXLive::TLConfig;
-use TeXLive::TLPOBJ;
-use TeXLive::TLPDB;
-use TeXLive::TLUtils;
-use Getopt::Long;
-use Pod::Usage;
-use File::Path;
-
-my $opt_all = 0;
-our $mydir;
-my $opt_outputdir = "./archive";
-my $opt_relative = 0;
-my $help = 0;
-
-TeXLive::TLUtils::process_logging_options();
-
-GetOptions("o|outputdir=s" => \$opt_outputdir,
- "a|all!" => \$opt_all,
- "r|relative!" => \$opt_relative,
- "h|help|?" => \$help) or pod2usage(1);
-
-pod2usage(-exitstatus => 0, -verbose => 2) if $help;
-
-my $srcsplit = 0;
-my $docsplit = 0;
-my $type = "lzma";
-
-exit (&main ());
-
-sub main
-{
- # get the db.
- chomp (my $Master = `cd $mydir/../.. && pwd`); # xx TLPDB should default
- my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master");
- die("Cannot find tlpdb in $Master!\n") unless defined($tlpdb);
- my @packs;
- if ($opt_all) {
- @packs = $tlpdb->list_packages;
- } else {
- @packs = @ARGV;
- }
- # get configuration of package splitting
- $srcsplit = $tlpdb->config_src_container;
- $docsplit = $tlpdb->config_doc_container;
- my $format = $tlpdb->config_container_format;
- if (($format eq "lzma") || ($format eq "zip")) {
- $type = $format;
- } else {
- info("unknown container format specified in 00texlive.config: $format\nIgnoring and continuing with $type!\n");
- }
- # get list of packages.
- my $last = "";
- my $src_count = 0;
- for my $pkg (sort @packs) {
- next if ($pkg eq "00texlive.config");
- next if ($pkg eq "00texlive.installer");
- if ($opt_all) {
- my $first = lc (substr ($pkg, 0, 1));
- if ($first ne $last) {
- print STDERR "$first ";
- $last = $first;
- }
- }
- my $obj = $tlpdb->get_package ($pkg);
- die "$0: no TeX Live package named $pkg in $Master.\n" if ! $obj;
- if ($srcsplit) {
- my $objsrc = $obj->srcfiles_package;
- if ($objsrc) {
- $objsrc->make_container($type,$Master,$opt_outputdir,"$pkg.source",$opt_relative);
- $src_count++;
- }
- }
- if ($docsplit) {
- my $objdoc = $obj->docfiles_package;
- if ($objdoc) {
- $objdoc->make_container($type,$Master,$opt_outputdir,"$pkg.doc",$opt_relative);
- $src_count++;
- }
- }
- $obj->make_container($type,$Master,$opt_outputdir,$pkg,$opt_relative);
- $src_count++;
- }
-}
-
-
-
-__END__
-
-=head1 NAME
-
-tlpdb2container - generate container files (zip,tar.lzma) of a package
-
-=head1 SYNOPSIS
-
-tlpdb2container [OPTION]...
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-all>
-build container file for all packages present in the tlpdb.
-
-=item B<-outputdir> I<outputdir>
-The location where created container files are placed, defaults to ./zip.
-
-=item B<-relative>
-Create a relative package, see TeXLive::TLPOBJ.1 for details.
-
-=back
-
-The standard options C<-help> and C<-debug> are also accepted.
-See the tlpfiles documentation for details.
-
-Note that the format of the containers and the splitting off of source
-and documentation files are controlled by the TLPDB options saved in the
-pseudo package C<00texlive.config>. Please see the documentation for TLPDB
-for details.
-
-
-=head1 DESCRIPTION
-
-To distribute packages over the network and on installation media the
-packages are wrapped into container files. These container are either
-simple zip files or tar.lzma file containing all the files of the package.
-
-B<tlpdb2container> generates container files from a TeX Live Database and the
-respective installation.
-
-=head1 AUTHORS AND COPYRIGHT
-
-This script and its documentation were written for the TeX Live
-distribution (L<http://tug.org/texlive>) and both are licensed under the
-GNU General Public License Version 2 or later.
-
-=cut
-
-### Local Variables:
-### perl-indent-level: 2
-### tab-width: 2
-### indent-tabs-mode: nil
-### End:
-# vim:set tabstop=2 expandtab: #
diff --git a/Master/tlpkg/bin/tlpdb2list b/Master/tlpkg/bin/tlpdb2list
deleted file mode 100755
index c3ab78bc550..00000000000
--- a/Master/tlpkg/bin/tlpdb2list
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env perl
-# $Id$
-# Copyright 2007, 2008 Norbert Preining
-# This file is licensed under the GNU General Public License version 2
-# or any later version.
-#
-# Create list files from tlpdb.
-
-BEGIN {
- $^W = 1;
- ($mydir = $0) =~ s,/[^/]*$,,;
- unshift (@INC, "$mydir/..");
-}
-
-use strict;
-
-use TeXLive::TLPOBJ;
-use TeXLive::TLPDB;
-use Getopt::Long;
-use Pod::Usage;
-use TeXLive::TLUtils;
-use File::Path;
-
-my $opt_outputdir = "new-list";
-my $help = 0;
-
-TeXLive::TLUtils::process_logging_options();
-
-GetOptions("outputdir=s" => \$opt_outputdir,
- "help|?" => \$help) or pod2usage(1);
-
-pod2usage(-exitstatus => 0, -verbose => 2) if $help;
-pod2usage(1) if ($#ARGV<0);
-
-if (! -d $opt_outputdir) {
- mkpath ($opt_outputdir) or die "cannot mkdir $opt_outputdir: $!";
-}
-
-die "cannot read tlpdb $ARGV[0]." if (! -r "$ARGV[0]");
-
-my $tlpdb = new TeXLive::TLPDB (root => $ARGV[0]);
-$tlpdb->generate_listfiles ($opt_outputdir);
-
-__END__
-
-=head1 NAME
-
-tlpdb2list - generates list files from a TeX Live Package Database
-
-=head1 SYNOPSIS
-
-tlpdb2list [OPTION]... /path/to/installation/root/
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-outputdir> I<output_dir>
-Specifies the location where list files are created. Defaults to
-C<./new-list>.
-
-=back
-
-The standard options C<-help>, C<-q>, and C<-v> are also accepted.
-See the tlpfiles documentation for details.
-
-=head1 DESCRIPTION
-
-B<tlpdb2list> generates list files necessary for the installer from the
-TeX Live Package Database found in the installation given on the
-command line.
-
-=head1 AUTHORS AND COPYRIGHT
-
-This script and its documentation were written for the TeX Live
-distribution (L<http://tug.org/texlive>) and both are licensed under the
-GNU General Public License Version 2 or later.
-
-=cut
-
-### Local Variables:
-### perl-indent-level: 2
-### tab-width: 2
-### indent-tabs-mode: nil
-### End:
-# vim:set tabstop=2: #
diff --git a/Master/tlpkg/bin/tlpsrc2container b/Master/tlpkg/bin/tlpsrc2container
deleted file mode 100755
index d79e365840c..00000000000
--- a/Master/tlpkg/bin/tlpsrc2container
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/usr/bin/env perl
-# $Id$
-# create container file(s) for all tlpsrc arguments
-#
-# Copyright 2007, 2008 Norbert Preining
-# This file is licensed under the GNU General Public License version 2
-# or any later version.
-
-BEGIN {
- $^W = 1;
- chomp ($mydir = `dirname $0`);
- unshift (@INC, "$mydir/..");
-}
-
-use strict;
-
-use TeXLive::TLPSRC;
-use TeXLive::TLPOBJ;
-use TeXLive::TLTREE;
-use TeXLive::TLUtils;
-use Cwd;
-use Getopt::Long;
-use Pod::Usage;
-use File::Path;
-
-
-my $opt_all = 0;
-chomp (my $opt_master = `cd $::mydir/../.. && pwd`);
-my $opt_catalogue = "";
-my $opt_type = "zip";
-my $opt_outputdir = "./zip";
-my $help = 0;
-
-TeXLive::TLUtils::process_logging_options();
-
-GetOptions(
- "all!" => \$opt_all,
- "master=s" => \$opt_master, # location of the tree
- "catalogue=s" => \$opt_catalogue, # location of the TeX Catalogue
- "outputdir=s" => \$opt_outputdir,
- "type=s" => \$opt_type,
- "help|?" => \$help) or pod2usage(1);
-
-pod2usage(-exitstatus => 0, -verbose => 2) if $help;
-
-exit(&main ());
-
-sub main
-{
- if (! -d "$opt_master") {
- die "$0: Master $opt_master not a directory, goodbye.\n";
- }
-
- if (! -d "$opt_outputdir") {
- mkpath("$opt_outputdir") or die "Cannot mkdir $opt_outputdir!";
- }
- # we have an relative zipdir, so we have to make it absolute
- my $cwd = &getcwd;
- if ("$opt_outputdir" !~ m@^/@) {
- $opt_outputdir = "$cwd/$opt_outputdir";
- }
-
- my $tlc = undef;
- if (! -d $opt_catalogue) {
- info("$0: -c /Cat/a/logue not given, continuing without it.\n");
- } else {
- require TeXLive::TeXCatalogue; # not at compile time, for now anyway.
- info("$0: reading TeX Catalogue tree $opt_catalogue ...\n");
- $tlc = TeXLive::TeXCatalogue->new( "location" => $opt_catalogue );
- }
-
- # if we're regenerating the whole thing, get all our tlpsrc files.
- if ($opt_all) {
- my $tlpsrc_dir = "$opt_master/tlpkg/tlpsrc";
- chdir ($tlpsrc_dir) || die "chdir($tlpsrc_dir) failed: $!";
- @ARGV = glob ("*.tlpsrc");
- }
-
- info("$0: reading Master tree $opt_master ...\n");
- my $tltree = TeXLive::TLTREE->new( "svnroot" => $opt_master );
- $tltree->init_from_svn;
-
- my $last = "";
- my $src_count = 0;
- foreach my $f (@ARGV) {
- if ($opt_all) { # progress report
- my $first = lc (substr ($f, 0, 1));
- if ($first ne $last) {
- print STDERR "$first ";
- $last = $first;
- }
- $src_count++;
- }
- my $tlsrc = new TeXLive::TLPSRC;
- $tlsrc->from_file($f);
- my $tlp = $tlsrc->make_tlpobj($tltree);
-
- if ($tlc) {
- # merge TeX Catalogue information
- $tlp->update_from_catalogue ($tlc);
- }
-
- $tlp->make_container($opt_type,$opt_master,$opt_outputdir);
- }
- warn "\n";
-
- return 0;
-}
-
-__END__
-
-=head1 NAME
-
-tlpsrc2container - create container file(s) from tlpsrc files
-
-=head1 SYNOPSIS
-
-tlpsrc2container [OPTION]... [TLPSRC]...
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-all>
-Generate container files for all .tlpsrc files in C<Master/tlpkg/tlpsrc/*.tlpsrc>.
-
-=item B<-outputdir> I<outputdir>
-The location where created container files are placed, defaults to ./zip.
-
-=item B<-master> I<Master_dir>
-The location given by B<-master> must point to a valid svn repository
-of TeX Live Master direcory. Defaults to C<../..> of C<$0>.
-
-=item B<-catalogue> I<Catalogue_dir>
-The location given by B<-catalogue> must point to a valid TeX Catalogue.
-No default value. If given, the included tlpobj files will contain information
-gathered from the TeX Catalogue.
-
-=item B<-type> I<zip|lzma>
-Specifies the type of container to be used. C<zip> generates zip files,
-while C<lzma> generates .tar.lzma files.
-
-=back
-
-The standard options C<-help> and C<-debug> are also accepted.
-See the tlpfiles documentation for details.
-
-
-=head1 DESCRIPTION
-
-To distribute packages over the network and on installation media the
-packages are wrapped into container files. These container are either
-simple zip files or tar.lzma file containing all the files of the package.
-
-B<tlpsrc2container> converts TeX Live Package Source files (tlpsrc) into
-container files containing all the files in the package.
-
-If a TeX Catalogue hierarchy is specified, additional information from
-the catalogue are merged into the database (see L<TeXLive::TLPOBJ> for
-the list of included information from the TeX Catalogue).
-
-
-=head1 AUTHORS AND COPYRIGHT
-
-This script and its documentation were written for the TeX Live
-distribution (L<http://tug.org/texlive>) and both are licensed under the
-GNU General Public License Version 2 or later.
-
-=cut
-
-### Local Variables:
-### perl-indent-level: 2
-### tab-width: 2
-### indent-tabs-mode: nil
-### End:
-# vim:set tabstop=2 expandtab: #
diff --git a/Master/tlpkg/bin/tlpsrc2tlpobj b/Master/tlpkg/bin/tlpsrc2tlpobj
deleted file mode 100755
index 3135dafd243..00000000000
--- a/Master/tlpkg/bin/tlpsrc2tlpobj
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env perl
-# $Id$
-# tlpsrc2tlpobj - convert tlpsrc files (given as arguments) to tlpobj
-#
-# Copyright 2007, 2008 Norbert Preining
-# This file is licensed under the GNU General Public License version 2
-# or any later version.
-
-BEGIN {
- $^W = 1;
- chomp ($mydir = `dirname $0`);
- unshift (@INC, "$mydir/..");
-}
-
-use strict;
-
-use TeXLive::TLPSRC;
-use TeXLive::TLPOBJ;
-use TeXLive::TLTREE;
-use TeXLive::TLUtils;
-use Getopt::Long;
-use Pod::Usage;
-use File::Path;
-
-my $opt_catalogue = "";
-chomp (my $opt_master = `cd $::mydir/../.. && pwd`);
-my $opt_outputdir = "./tlpobj";
-my $opt_help = 0;
-
-TeXLive::TLUtils::process_logging_options();
-GetOptions(
- "catalogue=s" => \$opt_catalogue, # location of the TeX Catalogue
- "master=s" => \$opt_master, # location of the tree
- "outputdir=s" => \$opt_outputdir,
- "help|?" => \$opt_help) or pod2usage(1);
-pod2usage ('-exitstatus' => 0, '-verbose' => 2) if $opt_help;
-
-die "Master $opt_master not a directory" if ! -d $opt_master;
-if (! -d $opt_outputdir) {
- mkpath ($opt_outputdir);
- die "mkdir($opt_outputdir) failed: $!" if ! -d $opt_outputdir;
-}
-
-my $tlc = undef;
-if (! -d "$opt_catalogue") {
- info ("$0: -d /Cat/a/logue not given, continuing without it.\n");
-} else {
- require TeXLive::TeXCatalogue; # not at compile time, for now anyway.
- $tlc = TeXLive::TeXCatalogue->new ('location' => $opt_catalogue);
-}
-
-my $tltree = TeXLive::TLTREE->new ('svnroot' => $opt_master);
-$tltree->init_from_svn;
-
-foreach my $f (@ARGV) {
- my $tlsrc = new TeXLive::TLPSRC;
- $tlsrc->from_file ($f);
-
- my $tlp = $tlsrc->make_tlpobj ($tltree);
- if ($tlc) {
- $tlp->update_from_catalogue ($tlc);
- }
-
- my $name = $tlp->name;
-
- my $OUT;
- $OUT = ">$opt_outputdir/$name.tlpobj";
- open (OUT, $OUT) || die "create($OUT) failed: $!";
- $tlp->writeout (\*OUT);
- close (OUT) || warn "close($OUT) failed: $!";
-}
-
-__END__
-
-=head1 NAME
-
-tlpsrc2tlpobj - convert tlpsrc files into tlpobj files
-
-=head1 SYNOPSIS
-
-tlpsrc2tlpobj [OPTION]... [TLPSRC]...
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-catalogue> I<Catalogue_dir>
-
-The location given by B<-catalogue> must point to a valid TeX Catalogue.
-No default value. If given, the generated tlpobj files will contain
-information gathered from the TeX Catalogue.
-
-=item B<-master> I<Master_dir>
-
-The location given by B<-master> must point to a valid svn repository
-of TeX Live's Master direcory. Defaults to C<../..> of C<$0>.
-
-=item B<-outputdir> I<output_dir>
-
-Specifies the location where tlpobj files are created; default C<./tlpobj>.
-
-=back
-
-The standard options B<-q>, B<-v>, and B<-logfile>=I<file> are also
-accepted; see the C<process_logging_options> function in
-L<TeXLive::TLUtils> for details.
-
-=head1 DESCRIPTION
-
-B<tlpsrc2tlpobj> converts TeX Live Package Source files (tlpsrc) into
-TeX Live Package Object files (tlpobj). The process and the file
-formats are described elsewhere. See L<TeXLive::TLPSRC> and
-L<TeXLive::TLPOBJ>.
-
-=head1 AUTHORS AND COPYRIGHT
-
-This script and its documentation were written for the TeX Live
-distribution (L<http://tug.org/texlive>) and both are licensed under the
-GNU General Public License Version 2 or later.
-
-=cut
-
-### Local Variables:
-### perl-indent-level: 2
-### tab-width: 2
-### indent-tabs-mode: nil
-### End:
-# vim:set tabstop=2: #