diff options
author | Norbert Preining <preining@logic.at> | 2008-05-06 20:05:48 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-05-06 20:05:48 +0000 |
commit | 8f27e661c380b795bac3738d1ae183559d4b4018 (patch) | |
tree | 40fa5762755dcb6882eb9482a9ca2937af9b837e | |
parent | 918d1c47f0e8024fce013fd627b5e327c24e5390 (diff) |
update --all or update pkg1 pkg2 ...
git-svn-id: svn://tug.org/texlive/trunk@7899 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 2cbd2aa0d41..41577179d31 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -463,13 +463,24 @@ sub action_update { # initialize the TLMedia from $location my $opt_nodepends = 0; my $opt_dry = 0; + my $opt_all = 0; Getopt::Long::Configure(qw(no_pass_through)); GetOptions("no-depends" => \$opt_nodepends, + "all" => \$opt_all, "dry-run" => \$opt_dry) or pod2usage(2); my %ret; $tlmediasrc = TeXLive::TLMedia->new($location); my $mediatlpdb = $tlmediasrc->tlpdb; - foreach my $pkg ($localtlpdb->list_packages) { + my @todo; + if ($opt_all) { + @todo = $localtlpdb->list_packages; + } else { + @todo = @ARGV; + } + if (!@todo) { + printf "tlmgr update takes either a list of packages or --all\"; + } + foreach my $pkg (@todo) { next if ($pkg =~ m/^00texlive/); my $tlp = $localtlpdb->get_package($pkg); my $rev = $tlp->revision; @@ -955,12 +966,16 @@ written to the terminal. =back -=item B<update [I<option>]...> - -Update all packages to the latest available. Options: +=item B<update [I<option>] [pkg [pkg ...]]> +Updates the packages given as arguments to the latest version available +at the installation source. Options: =over 8 +=item B<--all> + +Update all package. + =item B<--dry-run> Nothing is actually installed; instead, the actions to be performed are |