summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-26 18:07:36 +0000
committerKarl Berry <karl@freefriends.org>2012-05-26 18:07:36 +0000
commit053051acf0c2867c7f420a12fbf16c0179091462 (patch)
tree6438a30728cd2bfd7b61dce408060fd2e075f3cf /Master/tlpkg/TeXLive
parent1a403278034ef69ced347d4a046bc4aaf48008af (diff)
back to parsing catalogue xml directly, no perl dump
git-svn-id: svn://tug.org/texlive/trunk@26663 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm54
1 files changed, 22 insertions, 32 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 51f2cba92b0..70425ff26ed 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -357,9 +357,8 @@ currently based on the value of Perl's C<$^O> variable.
=cut
-sub win32
-{
- if ($^O=~/^MSWin(32|64)$/i) {
+sub win32 {
+ if ($^O =~ /^MSWin/i) {
return 1;
} else {
return 0;
@@ -478,8 +477,7 @@ C<chdir($dir)> or die.
=cut
-sub xchdir
-{
+sub xchdir {
my ($dir) = @_;
chdir($dir) || die "$0: chdir($dir) failed: $!";
ddebug("xchdir($dir) ok\n");
@@ -492,8 +490,7 @@ Run C<system(@args)> and die if unsuccessful.
=cut
-sub xsystem
-{
+sub xsystem {
my (@args) = @_;
ddebug("running system(@args)\n");
my $retval = system(@args);
@@ -880,8 +877,7 @@ that is a fatal error.
=cut
-sub copy
-{
+sub copy {
my $infile = shift;
my $filemode = 0;
if ($infile eq "-f") { # second argument is a file
@@ -1001,8 +997,7 @@ C</absolute/path/to/dir1>.
=cut
-sub collapse_dirs
-{
+sub collapse_dirs {
my (@files) = @_;
my @ret = ();
my %by_dir;
@@ -1071,8 +1066,7 @@ returns all the directories from which all content will be removed
# case put that directory into the removal list
# - return this removal list
#
-sub removed_dirs
-{
+sub removed_dirs {
my (@files) = @_;
my %removed_dirs;
my %by_dir;
@@ -2224,8 +2218,7 @@ Returns 1 if different, 0 if the same.
=cut
-sub tlcmp
-{
+sub tlcmp {
my ($filea, $fileb) = @_;
if (!defined($fileb)) {
die <<END_USAGE;
@@ -2241,11 +2234,14 @@ END_USAGE
}
-# Return contents of FNAME as a string, converting all of CR, LF, and
-# CRLF to just LF.
-#
-sub read_file_ignore_cr
-{
+=item C<read_file_ignore_cr($file)>
+
+Return contents of FILE as a string, converting all of CR, LF, and
+CRLF to just LF.
+
+=cut
+
+sub read_file_ignore_cr {
my ($fname) = @_;
my $ret = "";
@@ -2501,8 +2497,7 @@ sub download_file {
return($ret);
}
-sub _download_file
-{
+sub _download_file {
my ($url, $dest, $wgetdefault) = @_;
if (win32()) {
$dest =~ s!/!\\!g;
@@ -3189,8 +3184,7 @@ If HASH is a reference, it is followed.
=cut
-sub debug_hash
-{
+sub debug_hash {
my ($label) = shift;
my (%hash) = (ref $_[0] && $_[0] =~ /.*HASH.*/) ? %{$_[0]} : @_;
@@ -3385,8 +3379,7 @@ and the program has to be C<wget> since we parse the output.
=cut
-sub query_ctan_mirror
-{
+sub query_ctan_mirror {
my $wget = $::progs{'wget'};
if (!defined ($wget)) {
tlwarn("query_ctan_mirror: Programs not set up, trying wget\n");
@@ -3441,8 +3434,7 @@ Check if MIRROR is functional.
=cut
-sub check_on_working_mirror
-{
+sub check_on_working_mirror {
my $mirror = shift;
my $wget = $::progs{'wget'};
@@ -3479,8 +3471,7 @@ sub check_on_working_mirror
=cut
-sub give_ctan_mirror_base
-{
+sub give_ctan_mirror_base {
my @backbone = qw!http://www.ctan.org/tex-archive
http://www.tex.ac.uk/tex-archive
http://dante.ctan.org/tex-archive!;
@@ -3523,8 +3514,7 @@ sub give_ctan_mirror_base
}
-sub give_ctan_mirror
-{
+sub give_ctan_mirror {
return (give_ctan_mirror_base(@_) . "/$TeXLiveServerPath");
}