summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2015-05-06 01:48:42 +0000
committerNorbert Preining <preining@logic.at>2015-05-06 01:48:42 +0000
commit16168479189732ebd4a202e2891177d0745ddf43 (patch)
tree155d894f856a91d01f20518c64f15cab87b8c339 /Master
parent0b9c5fdbe8cc3c95f32079155005243a369133fd (diff)
merge functionality of tlpkg-revision into tlpkginfo, reactivate in makeself
git-svn-id: svn://tug.org/texlive/trunk@37220 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/tlpkg/bin/tl-makeself-from-tlnet10
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-revision57
-rwxr-xr-xMaster/tlpkg/bin/tlpkginfo56
3 files changed, 64 insertions, 59 deletions
diff --git a/Master/tlpkg/bin/tl-makeself-from-tlnet b/Master/tlpkg/bin/tl-makeself-from-tlnet
index 4ac1c0cf65b..f3bc140466a 100755
--- a/Master/tlpkg/bin/tl-makeself-from-tlnet
+++ b/Master/tlpkg/bin/tl-makeself-from-tlnet
@@ -1,6 +1,6 @@
#!/bin/sh -e
# $Id$
-# Copyright 2008-2015 Norbert Preining
+# Copyright 2008-2014 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -30,8 +30,14 @@ cd $TMP
mkdir master
cd master
+maxrev=0
+
# unpack texlive.infra archives for all platforms, except w32.
for pkg in texlive.infra; do
+ pkgrev=`tlpkginfo --revision $pkg $TLNET`
+ if [ $pkgrev -gt $maxrev ] ; then
+ maxrev=$pkgrev
+ fi
for i in $ARCHIVE/$pkg*.tar.xz; do
case "$i" in
*win32*) ;;
@@ -139,7 +145,7 @@ chmod ugo+x runme.sh
# were invoked.
cd $CWD
mydir=`cd \`dirname $0\` && pwd` # Master/tlpkg/bin
-rev=`svnversion $mydir | sed s/[^0-9].*//` # just the number, no status
+rev=$maxrev
makeself $TMP update-tlmgr-r$rev.sh "TeX Live Manager Updater" ./runme.sh
rm -rf $TMP
diff --git a/Master/tlpkg/bin/tlpkg-revision b/Master/tlpkg/bin/tlpkg-revision
deleted file mode 100755
index 3c075743b9d..00000000000
--- a/Master/tlpkg/bin/tlpkg-revision
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env perl
-# $Id$
-# Public domain. Originally written 2015, Norbert Preining.
-# Return the revision number of a package in a TL structure
-# (can be a tlnet archive, installation, or svn)
-#
-# output and exit codes:
-# repository not found or no modules available there
-# output: -1 exit code: 1
-# stderr warning
-# package not found:
-# output: 0 exit code: 1
-# stderr warning
-# both found
-# output: rev exit code: 0
-#
-# usage
-# tlpkg-revision <pkg> [ <tltree> ]
-
-$^W = 1;
-
-BEGIN {
- chomp ($mydir = `dirname $0`); # we are in Master/tlpkg/bin
- die "need at least pkg name as argument!" if ($#ARGV < 0);
- if ($#ARGV == 1) {
- # we got a tltree as second argument, use the modules from there
- if (! -d "$ARGV[1]/tlpkg/TeXLive") {
- printf STDERR "Cannot find tlpdb in $ARGV[1]\n";
- print "-1";
- exit(1);
- }
- unshift (@INC, "$ARGV[1]/tlpkg");
- $root = $ARGV[1];
- } else {
- unshift (@INC, "$mydir/..");
- $root = "$mydir/../..";
- }
-}
-
-use TeXLive::TLPOBJ;
-use TeXLive::TLPDB;
-
-my $tlpdb = TeXLive::TLPDB->new ("root" => $root);
-if (!defined($tlpdb)) {
- printf STDERR "Cannot find tlpdb in $root\n";
- print "-1";
- exit(1);
-}
-my $pkg = $tlpdb->get_package($ARGV[0]);
-if (!defined($pkg)) {
- printf STDERR "Cannot find $ARGV[0] package\n";
- print "0";
- exit(1);
-}
-print $pkg->revision;
-exit(0);
-
diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo
index 387c226162d..3b8819248c6 100755
--- a/Master/tlpkg/bin/tlpkginfo
+++ b/Master/tlpkg/bin/tlpkginfo
@@ -3,11 +3,66 @@
# Public domain. Originally written 2005, Karl Berry.
#
# Return information given a TL package name (i.e., a tlpsrc file name).
+# With -rev (--revision) argument given, returns only the revision number
+# of the package (see below for details).
# We require local copies of CTAN and the TeX Catalogue.
+BEGIN {
+ $^W = 1;
+ ($mydir = $0) =~ s,/[^/]*$,,;
+ unshift (@INC, "$mydir/..");
+}
+
exit (&main ());
sub main {
+ if ($#ARGV >= 0 && ($ARGV[0] =~ m/^--?rev(ision)?$/)) {
+ &tlpkgrevision();
+ } else {
+ &ctaninfo();
+ }
+}
+
+
+
+sub tlpkgrevision {
+ # output and exit codes:
+ # repository not found or no modules available there
+ # output: -1 exit code: 1
+ # stderr warning
+ # package not found:
+ # output: 0 exit code: 1
+ # stderr warning
+ # both found
+ # output: rev exit code: 0
+ #
+ # tlpkginfo -revision <pkg> [ <tltree> ]
+ require TeXLive::TLPOBJ;
+ require TeXLive::TLPDB;
+ die "need at least pkg name as argument!" if ($#ARGV < 1);
+ if ($#ARGV == 2) {
+ $root = $ARGV[2];
+ } else {
+ $root = "$mydir/../..";
+ }
+ my $tlpdb = TeXLive::TLPDB->new ("root" => $root);
+ if (!defined($tlpdb)) {
+ printf STDERR "Cannot find tlpdb in $root\n";
+ print "-1";
+ exit(1);
+ }
+ my $pkg = $tlpdb->get_package($ARGV[1]);
+ if (!defined($pkg)) {
+ printf STDERR "Cannot find $ARGV[1] package\n";
+ print "0";
+ exit(1);
+ }
+ print $pkg->revision;
+ exit(0);
+}
+
+
+sub ctaninfo {
$CTAN = $ENV{"CTAN"} || "/home/ftp/tex-archive";
$TMPDIR = $ENV{"TMPDIR"} || "/tmp";
$CATALOGUE = $ENV{"TEX_CATALOGUE"} || "/home/httpd/html/catalogue/entries";
@@ -26,6 +81,7 @@ sub main {
# special packages from latex-tds project; used by prepare()
#$amslatex_tds_pkgs = "xamscls|xamsmath|xamsrefs"; # from amslatex.tds
+ $amslatex_tds_pkgs = ''; # silence $^W as it is used further down there
#$amsfonts_tds_pkgs = "amsfonts";
# (amstex and amsfonts handled from the original.)
$latex_tds_pkgs = "latex-tds";