summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-05-05 13:15:34 +0000
committerNorbert Preining <preining@logic.at>2008-05-05 13:15:34 +0000
commit9ee10541783a9ff8e1e378499fa3fc1c65363b72 (patch)
treecca8b12eb21231e4a6c2d23fbccacb1d52041757
parent791fea494c58ed06fe2be9dab5e45e6e1375efc8 (diff)
support location, netarchive, diskarchive in gui and transfer of options
git-svn-id: svn://tug.org/texlive/trunk@7859 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl24
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl22
2 files changed, 41 insertions, 5 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 3f682efb65d..70fdadc9e44 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -66,10 +66,12 @@ my $location;
my $opt_location;
my $opt_help = 0;
my $opt_debug = 0;
+my $opt_netarchive;
+my $opt_diskarchive;
GetOptions("location=s" => \$opt_location,
- "netarchive=s" => \$NetArchive,
- "diskarchive=s" => \$DiskArchive,
+ "netarchive=s" => \$opt_netarchive,
+ "diskarchive=s" => \$opt_diskarchive,
"debug!", "h|help|?" => \$opt_help) or pod2usage(1);
my $action = shift;
@@ -82,13 +84,24 @@ if (defined($action) && ($action =~ m/^help/i)) {
$opt_help = 1;
}
+$NetArchive = $opt_netarchive if (defined($opt_netarchive));
+$DiskArchive = $opt_diskarchive if (defined($opt_diskarchive));
+
if (defined($action) && ($action =~ m/^gui/i)) {
my $perlbin = "perl";
if ($^O=~/^MSWin(32|64)$/i) {
$ENV{'PERL5LIB'} = "$Master/tlpkg/tlperl/lib";
$perlbin = "$Master/tlpkg/tlperl/bin/perl.exe";
}
- exec($perlbin, "$Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl");
+ my @cmdline;
+ push @cmdline, $perlbin, "$Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl";
+ push @cmdline, "--location", "$opt_location"
+ if (defined($opt_location));
+ push @cmdline, "--netarchive", "$opt_netarchive"
+ if (defined($opt_netarchive));
+ push @cmdline, "--diskarchive", "$opt_diskarchive"
+ if (defined($opt_diskarchive));
+ exec(@cmdline);
die("Cannot execute the GUI script\n");
}
@@ -910,6 +923,11 @@ tlmgr [OPTIONS] ACTION ...
Gives this help page.
+=item B<gui>
+
+Starts the GUI. Currently not all options of the cmd line version are
+supported in the GUI.
+
=item B<install [options] pkg1 [pkg2 [pkg3 ...]]>
Install all packages given on the cmdline. By default this installs all
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
index fe355347049..9dc6341fef8 100755
--- a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
@@ -18,11 +18,21 @@ BEGIN {
use TeXLive::TLMedia;
use TeXLive::TLPDB;
+use TeXLive::TLConfig;
use TeXLive::TLUtils qw(setup_programs);
-
+use Getopt::Long qw(:config no_autoabbrev require_order);
use Tk;
use Tk::Dialog;
+my $opt_location;
+my $opt_debug = 0;
+my $opt_netarchive;
+my $opt_diskarchive;
+
+GetOptions("location=s" => \$opt_location,
+ "netarchive=s" => \$NetArchive,
+ "diskarchive=s" => \$DiskArchive,
+ "debug!" => \$opt_debug) or die("Unsupported argument!");
our $back_f1;
our $back_f2;
@@ -32,7 +42,15 @@ die("cannot find tlpdb!") unless (defined($localtlpdb));
our @alllocalpackages = setup_list(0,$localtlpdb->list_packages);
setup_programs("$Master/tlpkg/installer", $localtlpdb->option_platform);
-our $location = $localtlpdb->option_location;
+our $location;
+my $loc = $localtlpdb->option_location;
+if (defined($loc)) {
+ $location = $loc;
+}
+if (defined($opt_location)) {
+ $location = $opt_location;
+}
+# our $location = $localtlpdb->option_location;
our $tlmediasrc;
our $tlmediatlpdb;