summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr2.pl28
1 files changed, 13 insertions, 15 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr2.pl b/Master/texmf/scripts/texlive/tlmgr2.pl
index 69bce3ecfb3..ae06725cae6 100755
--- a/Master/texmf/scripts/texlive/tlmgr2.pl
+++ b/Master/texmf/scripts/texlive/tlmgr2.pl
@@ -202,9 +202,7 @@ ddebug("action = $action\n");
for my $k (keys %opts) {
ddebug("$k => $opts{$k}\n");
}
-if (@ARGV) {
- ddebug("arguments: @ARGV\n");
-}
+ddebug("arguments: @ARGV\n") if @ARGV;
sub give_version {
if (!defined($::version_string)) {
@@ -223,7 +221,7 @@ sub give_version {
}
if ($opts{"version"} || (defined $action && $action eq "version")) {
- info( give_version() );
+ info(give_version());
finish(0);
}
@@ -231,7 +229,7 @@ if (defined($action) && ($action =~ m/^help/i)) {
$opts{"help"} = 1;
}
-if (!defined($action) && !$opts{"help"}) {
+if (!defined($action) || !$action) {
die "$0: missing action; try --help if you need it.\n";
}
@@ -249,7 +247,7 @@ if ($opts{"help"}) {
# unify arguments so that the $action contains paper in all cases
# and push the first arg back to @ARGV for action_paper processing
if ($action =~ /paper|dvips|xdvi|pdftex|dvipdfmx?|context/) {
- @ARGV = ($action, @ARGV);
+ unshift(@ARGV, $action);
$action = "paper";
}
@@ -264,7 +262,7 @@ for my $k (keys %opts) {
if ($k eq "n" || $k eq "dry-run") {
$kk = "dry-run|n";
}
- if ( !defined($suppargs{$kk}) && !defined($globaloptions{$kk}) ) {
+ if (!defined($suppargs{$kk}) && !defined($globaloptions{$kk})) {
push @notvalidargs, $k;
}
}
@@ -399,7 +397,7 @@ sub execute_action {
merge_into(\%ret, action_uninstall());
finish(0);
} else {
- die "$0: unknown action: $action\n";
+ die "$0: unknown action: $action; try --help if you need it.\n";
}
# close the special log file
if ($packagelogfile && !$::gui_mode) {
@@ -1255,21 +1253,21 @@ sub close_w32_updater {
# tlmgr update --no-depends-at-all foo
# will absolutely only update foo not even taking .ARCH into account
#
-# TLMedia->install_package does ONLY INSTALL ONE PACKAGE, no deps whatsoever
+# TLMedia->install_package INSTALLS ONLY ONE PACKAGE, no deps whatsoever
# anymore. That has all to be done by hand.
#
sub machine_line {
- my ($flag) = @_;
+ my ($flag1) = @_;
my $ret = 0;
- if ($flag eq "-ret") {
+ if ($flag1 eq "-ret") {
$ret = 1;
shift;
}
my ($pkg, $flag, $lrev, $rrev, @args) = @_;
- $lrev || ($lrev = "-");
- $rrev || ($rrev = "-");
- $flag || ($flag = "?");
- my $str = "$pkg\t$flag\t$lrev\t$rrev\t" . join("\t",@args) . "\n";
+ $lrev ||= "-";
+ $rrev ||= "-";
+ $flag ||= "?";
+ my $str = "$pkg\t$flag\t$lrev\t$rrev\t" . join("\t", @args) . "\n";
return($str) if $ret;
print $str;
}