diff options
author | Karl Berry <karl@freefriends.org> | 2008-11-28 01:21:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-11-28 01:21:05 +0000 |
commit | 37d75e59ddd5fe08ecd0395b8a62f59b7947ae28 (patch) | |
tree | b5516de05061f40d98a69fab2e32cd9814121536 /Master/install-tl | |
parent | 0604602c658a52f572a2b7dbfd60d6976edfa669 (diff) |
* install-tl (BEGIN): do not chdir to `dirname $0` (aka $Master); instead,
just set $::installerdir to it.
* tlpkg/installer/install-menu-text.pl (input_dirname): new fn,
factoring out directory processing code. Transform relative paths to
absolute.
(directories_menu): call it.
git-svn-id: svn://tug.org/texlive/trunk@11446 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/Master/install-tl b/Master/install-tl index 8831c97e401..5c4161e2e76 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -26,34 +26,26 @@ $::installerrevision = $1; # taken from 00texlive.config: release, $tlpdb->config_release; our $texlive_release; -my $localpath; BEGIN { $^W = 1; - my $me=$0; - $me=~s!\\!/!g if $^O=~/^MSWin(32|64)$/i; - if ($me=~m!/!) { - ($localpath=$me)=~s!(.*)/.*$!$1!; - # we have to chdir to the Master ... - chdir($localpath); + my $Master; + my $me = $0; + $me =~ s!\\!/!g if $^O =~ /^MSWin(32|64)$/i; + if ($me =~ m!/!) { + ($Master = $me) =~ s!(.*)/[^/]*$!$1!; } else { - $localpath = '.'; - } - $::installerdir='.'; - # Windows: The installer uses a minimal subset of Perl. In order - # to avoid conflicts with other versions of Perl already installed on - # the system, we simply ignore them. The installer has to execute - # $::installerdir/tlpkg/bin/perl.exe and should not rely on any other - # Perl executable. The batchfile wrapper takes care of this. - #if ($^O=~/^MSWin(32|64)$/i) { - # @INC="$::installerdir/tlpkg/installer/perllib"; - #} + $Master = "."; + } + $::installerdir = $Master; # All platforms: add the installer modules unshift (@INC, "$::installerdir/tlpkg"); } +use Cwd 'abs_path'; use Getopt::Long qw(:config no_autoabbrev); +use Pod::Usage; use TeXLive::TLUtils qw(platform platform_desc which getenv win32 unix info log debug tlwarn ddebug @@ -65,8 +57,6 @@ use TeXLive::TLPOBJ; use TeXLive::TLPDB; use TeXLive::TLConfig; use TeXLive::TLPostActions; -use Pod::Usage; -use Cwd 'abs_path'; if (win32) { require TeXLive::TLWinGoo; @@ -173,7 +163,7 @@ $::alternative_selector = 0; # continue with the installation # note, we are in the installer directory. if (-r "installation.profile") { - print "ABORTED INSTALLATION FOUND: $localpath/installation.profile\n"; + print "ABORTED INSTALLATION FOUND: installation.profile\n"; print "Do you want to continue with the exact same settings as before (y/N): "; my $answer = <STDIN>; if ($answer =~ m/^y(es)?$/i) { |