From 03369d1bf6968ae0ad65c91cd4607e973bc3a761 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 2 Aug 2008 23:28:07 +0000 Subject: accept version as action as well as --version option. For version output, output first and last lines of release-texlive.txt, if we can find the file. git-svn-id: svn://tug.org/texlive/trunk@10022 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf/scripts/texlive/tlmgr.pl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'Master') diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 4b86514586f..7832ac8974b 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -68,8 +68,15 @@ if (!defined($action) && $opt_gui) { $action = "gui"; } -if ($opt_version) { +if ($opt_version || (defined $action && $action eq "version")) { print "tlmgr revision $tlmgrrevision\n"; + if (open (REL_TL, "$Master/release-texlive.txt")) { + # print first and last lines, which have the TL version info. + my @rel_tl = ; + print $rel_tl[0]; + print $rel_tl[$#rel_tl]; + close (REL_TL); + } exit 0; } @@ -147,7 +154,7 @@ if ($action =~ m/^_include_tlpobj$/) { merge_into(\%ret, action_uninstall()); exit(0); } else { - die "Unknown action: $action"; + die "$0: unknown action: $action\n"; } @@ -1293,13 +1300,20 @@ B<-q> (no informational messages), B<-v> (debugging messages, can be repeated). For the details about the latter, see the TeXLive::TLUtils documentation. +The B<--version> option shows version information about the TeX Live +release as well as the B script itself. + =head1 ACTIONS =over 8 =item B -Gives this help page. +Gives this help information (same as B<--help>). + +=item B + +Gives version information (same as B<--version>). =item B -- cgit v1.2.3