From 450bfa54886ef9c35469b032209d325cbaf0e590 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 23 May 2018 22:08:06 +0000 Subject: glossaries (23may18) git-svn-id: svn://tug.org/texlive/trunk@47817 c570f23f-e606-0410-a88d-b1316a301751 --- .../linked_scripts/glossaries/makeglossaries | 16 ++++++-- .../glossaries/makeglossaries-lite.lua | 16 +++++--- .../texk/texlive/linked_scripts/texlive/tlmgr.pl | 44 +++++++++++++++------- 3 files changed, 54 insertions(+), 22 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries b/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries index 97a45862641..218dfc921a5 100755 --- a/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries +++ b/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries @@ -2,7 +2,7 @@ # File : makeglossaries # Author : Nicola Talbot -# Version : 4.38 +# Version : 4.39 # Description: simple Perl script that calls makeindex or xindy. # Intended for use with "glossaries.sty" (saves having to remember # all the various switches) @@ -31,9 +31,11 @@ # glossaries-babel.sty, glossaries-polyglossia.sty, glossaries.perl. # Also makeglossaries and makeglossaries-lite.lua. -my $version="4.38 (2018-05-10)"; +my $version="4.39 (2018-05-23)"; # History: +# v4.39: +# * No change. # v4.38: # * No change. # v4.37: @@ -1521,8 +1523,16 @@ sub HELP_MESSAGE{ } sub VERSION_MESSAGE{ + + my $verYear = ''; + + if ($version=~/(\d{4})-\d{2}-\d{2}/) + { + $verYear = "-$1"; + } + print "Makeglossaries Version $version\n"; - print "Copyright (C) 2007 Nicola L C Talbot\n"; + print "Copyright (C) 2007$verYear Nicola L C Talbot\n"; print "This material is subject to the LaTeX Project Public License.\n"; } diff --git a/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries-lite.lua b/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries-lite.lua index 88f15ab08f1..77da25667b3 100755 --- a/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries-lite.lua +++ b/Build/source/texk/texlive/linked_scripts/glossaries/makeglossaries-lite.lua @@ -1,6 +1,6 @@ #!/usr/bin/env texlua --[[ - File : makeglossaries.lua + File : makeglossaries-lite.lua Author : Nicola Talbot Lua alternative to the makeglossaries Perl script. @@ -36,6 +36,8 @@ Also makeglossaries and makeglossaries-lite.lua. History: + * 4.39: + - corrected script name in version and help messages * 4.38: - no change. * 4.37: @@ -58,7 +60,7 @@ - changed first line from lua to texlua --]] -thisversion = "4.37 2018-04-07" +thisversion = "4.39 (2018-05-23)" quiet = false dryrun = false @@ -84,15 +86,18 @@ makeindex_extra = nil makeindex_m = "makeindex" function version() - print(string.format("makeglossaries.lua version %s", thisversion)) - print("Copyright (C) 2015 Nicola L C Talbot") + + verYear = string.match(thisversion, "%d%d%d%d"); + + print(string.format("makeglossaries-lite version %s", thisversion)) + print(string.format("Copyright (C) 2015-%s Nicola L C Talbot", verYear)) print("This material is subject to the LaTeX Project Public License.") end function help() version() print([[ -Syntax : makeglossaries.lua [options] +Syntax : makeglossaries-lite [options] For use with the glossaries package to pass relevant files to makeindex or xindy. @@ -136,6 +141,7 @@ Makeindex Options: This is a light-weight Lua alternative to the makeglossaries Perl script. If you want to use xindy, it's better to use the Perl makeglossaries version instead. + ]]) end diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl index bb721c6856f..a352d25b5e2 100755 --- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl +++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl @@ -1,12 +1,12 @@ #!/usr/bin/env perl -# $Id: tlmgr.pl 47303 2018-04-05 17:52:22Z karl $ +# $Id: tlmgr.pl 47763 2018-05-18 23:47:18Z preining $ # # Copyright 2008-2018 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. -my $svnrev = '$Revision: 47303 $'; -my $datrev = '$Date: 2018-04-05 19:52:22 +0200 (Thu, 05 Apr 2018) $'; +my $svnrev = '$Revision: 47763 $'; +my $datrev = '$Date: 2018-05-19 01:47:18 +0200 (Sat, 19 May 2018) $'; my $tlmgrrevision; my $tlmgrversion; my $prg; @@ -1091,7 +1091,8 @@ sub backup_and_remove_package { return($F_WARNING); } if ($opts{"backup"}) { - $tlp->make_container("xz", $localtlpdb->root, + my ($compressor, $compressorextension) = TeXLive::TLUtils::setup_compressor(); + $tlp->make_container($compressor, $localtlpdb->root, $opts{"backupdir"}, "${pkg}.r" . $tlp->revision, $tlp->relocated); @@ -1761,7 +1762,15 @@ sub get_available_backups { # for my $dirent (@dirents) { next if (-d $dirent); - next if ($dirent !~ m/^(.*)\.r([0-9]+)\.tar\.xz$/); + my $has_accepted_compressiontype = 0; + for my $comptype (@AcceptedCompressors) { + my $ext = $CompressorExtension{$comptype}; + $has_accepted_compressiontype = 1 if ($dirent =~ m/\.tar\.$ext$/); + } + next if (!$has_accepted_compressiontype); + if ($dirent !~ m/^(.*)\.r([0-9]+)\.tar\.(.*)$/) { + next; + } if (!$do_stat) { $backups{$1}->{$2} = 1; next; @@ -1796,9 +1805,13 @@ sub restore_one_package { my ($pkg, $rev, $bd) = @_; # first remove the package, then reinstall it # this way we get rid of useless files - my $restore_file = "$bd/${pkg}.r${rev}.tar.xz"; - if (! -r $restore_file) { - tlwarn("$prg: Cannot read $restore_file, no action taken\n"); + my $restore_file; + for my $comptype (@AcceptedCompressors) { + my $ext = $CompressorExtension{$comptype}; + $restore_file = "$bd/${pkg}.r${rev}.tar.$ext" if (-r "$bd/${pkg}.r${rev}.tar.$ext"); + } + if (!$restore_file) { + tlwarn("$prg: Cannot find restore file $bd/${pkg}.r${rev}.tar.*, no action taken\n"); return ($F_ERROR); } $localtlpdb->remove_package($pkg); @@ -1938,7 +1951,7 @@ sub action_restore { for my $p (sort keys %backups) { my @tmp = sort {$b <=> $a} (keys %{$backups{$p}}); my $rev = $tmp[0]; - print "Restoring $p, $rev from $opts{'backupdir'}/${p}.r${rev}.tar.xz\n"; + print "Restoring $p, $rev from $opts{'backupdir'}/${p}.r${rev}.tar.*\n"; if (!$opts{"dry-run"}) { # first remove the package, then reinstall it # this way we get rid of useless files @@ -2128,11 +2141,13 @@ sub action_backup { if ($clean_mode) { clear_old_backups ($pkg, $opts{"backupdir"}, $opts{"clean"}, $opts{"dry-run"}, 1); } else { + # for now default to xz and allow overriding with env var + my ($compressor, $compressorextension) = TeXLive::TLUtils::setup_compressor(); my $tlp = $localtlpdb->get_package($pkg); info("saving current status of $pkg to $opts{'backupdir'}/${pkg}.r" . - $tlp->revision . ".tar.xz\n"); + $tlp->revision . ".tar.$compressorextension\n"); if (!$opts{"dry-run"}) { - $tlp->make_container("xz", $localtlpdb->root, + $tlp->make_container($compressor, $localtlpdb->root, $opts{"backupdir"}, "${pkg}.r" . $tlp->revision); } } @@ -3163,11 +3178,12 @@ sub action_update { } if ($opts{"backup"} && !$opts{"dry-run"}) { - $tlp->make_container("xz", $root, + my ($compressor, $compressorextension) = TeXLive::TLUtils::setup_compressor(); + $tlp->make_container($compressor, $root, $opts{"backupdir"}, "${pkg}.r" . $tlp->revision, $tlp->relocated); $unwind_package = - "$opts{'backupdir'}/${pkg}.r" . $tlp->revision . ".tar.xz"; + "$opts{'backupdir'}/${pkg}.r" . $tlp->revision . ".tar.$compressorextension"; if ($autobackup) { # in case we do auto backups we remove older backups @@ -9517,7 +9533,7 @@ This script and its documentation were written for the TeX Live distribution (L) and both are licensed under the GNU General Public License Version 2 or later. -$Id: tlmgr.pl 47303 2018-04-05 17:52:22Z karl $ +$Id: tlmgr.pl 47763 2018-05-18 23:47:18Z preining $ =cut # to remake HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html -- cgit v1.2.3