From e016929f8993dbac12acc8031664e14e6fd7121b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 27 Oct 2008 10:21:07 +0000 Subject: rename many win32 to w32, and try to remove the updater.bat after execution. Missing: try to remove the desktop shortcut git-svn-id: svn://tug.org/texlive/trunk@11076 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf/scripts/texlive/tlmgr.pl | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'Master') diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 30a0d56c821..628eafa4178 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -312,7 +312,7 @@ if (defined($ret{'language'})) { "$TEXMFLOCAL/tex/generic/config/language-local.def"); # system("texconfig-sys", "generate", "language"); # - # win32 fmtutil needs language.dat WITHOUT full specification + # w32 fmtutil needs language.dat WITHOUT full specification if (TeXLive::TLUtils::win32()) { print "running fmtutil-sys --byhyphen language.dat\n"; system("fmtutil-sys", "--byhyphen", "language.dat"); @@ -745,7 +745,7 @@ sub action_backup { return(\%ret); } -sub open_win32_updater { +sub open_w32_updater { my $root = shift; open UPDATER, ">" . $root . "/tlpkg/installer/updater.bat" or die "Cannot create updater.bat: $!"; @@ -771,7 +771,7 @@ EOF $::updater_started = 0; # -sub add_win32_updater { +sub add_w32_updater { my ($tlp, $opt_dry) = @_; sub do_one { my $pkg = shift; @@ -791,10 +791,10 @@ EOF my $temp = "$root/temp"; return if $opt_dry; if (!$::updater_started) { - open_win32_updater($root); + open_w32_updater($root); $::updater_started = 1; } - # these packages cannot be upgrade on win32 + # these packages cannot be upgrade on w32 # so we have to create a update program my $media = $tlmediasrc->media; my $mediatlpdb = $tlmediasrc->tlpdb; @@ -856,11 +856,13 @@ EOF } } -sub close_win32_updater { +sub close_w32_updater { if ($::updater_started) { print $::UPDATER "del tlpkg\\installer\\tarsave.exe\n"; + #print $::UPDATER "del THE DESKTOP SHORTCUT\n"; print $::UPDATER "rem del /s /q temp\n"; print $::UPDATER "rem rmdir temp\n"; + print $::UPDATER "del ", $localtlpdb->root, '/tlpkg/installer/updater.bat', "\n"; close ($::UPDATER); # create a desktop shortcut add_desktop_shortcut( @@ -1117,7 +1119,7 @@ sub action_update { } } if (win32() && ($pkg =~ m/$WinSpecialUpdatePackagesRegexp/)) { - add_win32_updater($mediatlp, $opt_dry); + add_w32_updater($mediatlp, $opt_dry); } else { info("update: $pkg ($rev -> $mediarev)"); if ($opt_dry) { @@ -1159,7 +1161,7 @@ sub action_update { logpackage("failed update: $pkg ($rev -> $mediarev)"); tlwarn("\n\nInstallation of new version of $pkg did fail, trying to unwind!\n"); if (win32()) { - # win32 is notorious for not releasing a file immediately + # w32 is notorious for not releasing a file immediately # we experienced permission denied errors my $newname = $unwind_package; $newname =~ s/__BACKUP/___BACKUP/; @@ -1197,7 +1199,7 @@ sub action_update { } } # that already checks whether we actually have to do something - close_win32_updater(); + close_w32_updater(); if (($nrupdated == 0) && ($tlmediasrc->media ne "NET") && $opt_all) { # for all but net updates we warn if nothing is updated tlwarn("\nNothing to update.\n"); @@ -1458,7 +1460,7 @@ sub action_arch { } } if (TeXLive::TLUtils::member('win32', @todoarchs)) { - # install the necessary win32 stuff + # install the necessary w32 stuff info("install: bin-tlperl.win32\n"); merge_into (\%ret, $tlmediasrc->install_package("bin-tlperl.win32", $localtlpdb)); info("install: bin-tlgs.win32\n"); @@ -1529,7 +1531,7 @@ sub init_local_db { my ($should_i_die) = @_; $localtlpdb = TeXLive::TLPDB->new ("root" => $Master); die("cannot find tlpdb in $Master") unless (defined($localtlpdb)); - # setup the programs, for win32 we need the shipped wget/lzma etc, so we + # setup the programs, for w32 we need the shipped wget/lzma etc, so we # pass the location of these files to setup_programs. my $ret = setup_programs("$Master/tlpkg/installer", $localtlpdb->option_platform); @@ -1810,9 +1812,9 @@ sub check_files { } # if we are on Win32 or MacOS we return, they currently do not allow - # find -wholename (missing find on win32, or bsd find on darwin). + # find -wholename (missing find on w32, or bsd find on darwin). # we need the -use-svn version only for the check-file-coverage - # replacement anyway, so it will be used on tug, which is neither win32 nor + # replacement anyway, so it will be used on tug, which is neither w32 nor # darwin. my $arch = $localtlpdb->option_platform; return $ret if ($arch eq "win32" || $arch eq "universal-darwin"); -- cgit v1.2.3