diff options
Diffstat (limited to 'Master/tlpkg/bin/tlpkg-revision')
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-revision | 57 |
1 files changed, 0 insertions, 57 deletions
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); - |