summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2007-12-01 13:59:23 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2007-12-01 13:59:23 +0000
commit47b7d447b43d2170785aee624e6d63ba7c5f0c47 (patch)
tree9f91c1fa51b3cfc493e10eb62fc134c30760320d /Master
parent433d92e195a3f2614d1484a534782e5c1903268d (diff)
TLUtils.pm: s/lzcat/lzmadec/ and removed Fcntl
install-tl.pl: removed Cwd git-svn-id: svn://tug.org/texlive/trunk@5664 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/install-tl.pl2
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm23
2 files changed, 8 insertions, 17 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl
index 4dfa6165d2f..fff14cd8c32 100755
--- a/Master/install-tl.pl
+++ b/Master/install-tl.pl
@@ -33,7 +33,6 @@ use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
use TeXLive::TLConfig;
use Getopt::Long;
-use Cwd;
use strict;
@@ -507,7 +506,6 @@ sub do_install_packages {
my @allfiles = $tlpobj->all_files;
install_package(@allfiles);
} elsif (&media eq 'CD') {
- my $cwd = getcwd;
my $container = "$package";
if (-r "$installerdir/archive/$package.zip") {
$container = "$package.zip";
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 968a5219f7d..82a4faf76fc 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -8,7 +8,6 @@
package TeXLive::TLUtils;
-use Fcntl; # required by copy()
=pod
@@ -438,17 +437,17 @@ sub copy {
if (-l "$infile") {
symlink readlink "$infile", "$destdir/$filename";
} else {
- sysopen IN, "$infile", O_RDONLY
- or die "Can't open '$infile': $!\n";
+ open IN, "$infile" or die "Can't open '$infile': $!\n";
binmode IN;
$mode=(-x "$infile")? oct("0777"):oct("0666");
$mode-=umask;
- sysopen OUT, "$outfile", (O_CREAT|O_WRONLY), $mode
- or die "Can't open '$outfile': $!\n";
+ open OUT, ">$outfile" or die "Can't open '$outfile': $!\n";
binmode OUT;
+ chmod $mode, "$outfile";
+
while ($read=sysread IN, $buffer, $blocksize) {
die "system read error: $!\n" unless defined $read;
$offset=0;
@@ -486,7 +485,7 @@ sub install_package {
my $blocksize=2048;
#my $lzmadec="$bindir/lzmadec_$platform";
- my $lzmadec="lzcat";
+ my $lzmadec="lzmadec";
my $tar="/bin/tar -xf - -C";
my $wget="wget -nv -O-";
if (win32) {
@@ -503,8 +502,7 @@ sub install_package {
}
} elsif (&media eq 'CD') {
my $package="$::installerdir/archive/$what[0]";
- sysopen IN, "$package", O_RDONLY
- or warn "Can't open '$infile': $!\n";
+ open IN, "$package", or warn "Can't open '$infile': $!\n";
#or die "Can't open '$infile': $!\n";
binmode IN;
@@ -565,10 +563,8 @@ sub media {
=item C<initialize_installer>
-The function C<initialize_installer> first determines the directory in
-which tl-install.pl resides (which is C<`dirname $0`> on UNIX). Then
-it calls C<media> and C<platform> in order to set the variables
-C<$::_media_> and C<$::_platform_>.
+The function C<initialize_installer> calls C<media> and C<platform> in
+order to set the variables C<$::_media_> and C<$::_platform_>.
Note that C<$0> contains backslashes as path separators on Windows.
@@ -578,9 +574,6 @@ again.
=cut
sub initialize_installer {
-# my $me=$0;
-# $me=~s!\\!/!g if $^O=~/^MSWin(32|64)$/i;
-# ($::installerdir=$me)=~s!(.*)/.*$!$1!;
&media;
&platform;
}