summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-03-01 14:07:30 +0000
committerNorbert Preining <preining@logic.at>2008-03-01 14:07:30 +0000
commit1f477d2177accbeec9d1b2823489fb9db739eb05 (patch)
tree1e68eefb68eeae1162e2fcf0a96a598a597dc796 /Master/tlpkg/installer
parent8304cb4c91871691d406be88432d75686bc93213 (diff)
use Siep's fixes to uninstall-tl.*, no need to create more files
git-svn-id: svn://tug.org/texlive/trunk@6786 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer')
-rwxr-xr-xMaster/tlpkg/installer/uninstall-tl.bat10
-rwxr-xr-xMaster/tlpkg/installer/uninstall-tl.pl18
-rwxr-xr-xMaster/tlpkg/installer/uninstall-try.bat24
-rwxr-xr-xMaster/tlpkg/installer/uninstall-try.pl87
4 files changed, 15 insertions, 124 deletions
diff --git a/Master/tlpkg/installer/uninstall-tl.bat b/Master/tlpkg/installer/uninstall-tl.bat
index ed18ef8010f..b33fefde5cd 100755
--- a/Master/tlpkg/installer/uninstall-tl.bat
+++ b/Master/tlpkg/installer/uninstall-tl.bat
@@ -2,18 +2,18 @@
rem TeX Live Root; ends with backslash
rem This should also work with UNC names
-set tlroot=%~dp0
+set tlsub=%~dp0
set tldrive=%~d0
%tldrive%
-cd %tlroot%
+cd %tlsub%
rem use provided Perl
set PERL5SAVE=%PERL5LIB%
-set PERL5LIB=%tlroot%..\tlperl\lib
-"%tlroot%..\tlperl\bin\perl" "%tlroot%uninstall-tl.pl" %*
+set PERL5LIB=%tlsub%..\tlperl\lib
+"%tlsub%..\tlperl\bin\perl" "%~dpn0.pl" %1 %2 %3 %4 %5 %6 %7 %8 %9
rem pause Done
rem cleanup in case of start from command-line
@@ -21,4 +21,4 @@ rem cleanup in case of start from command-line
set PERL5LIB=%PERL5SAVE%
set PERL5SAVE=
set tldrive=
-set tlroot=
+set tlsub=
diff --git a/Master/tlpkg/installer/uninstall-tl.pl b/Master/tlpkg/installer/uninstall-tl.pl
index de443cc76ae..44d95fdab16 100755
--- a/Master/tlpkg/installer/uninstall-tl.pl
+++ b/Master/tlpkg/installer/uninstall-tl.pl
@@ -3,7 +3,7 @@
# $Id: uninstall-tl.pl 6381 2008-01-23 17:50:54Z preining $
# uninstall-tl.pl
#
-# Copyright 2008 Norbert Preining
+# Copyright 2008 Norbert Preining, Siep Kroonenberg
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -16,11 +16,11 @@ BEGIN {
$me=$0;
$me=~s!\\!/!g if $^O=~/^MSWin(32|64)$/i;
if ($me =~ m!/!) {
- $me =~ s!(.*)/.*$!$1!;
+ $me=~s!(.*)/[^/]+/[^/]*$!$1!; # parent
} else {
- $me = '.';
+ $me='./..';
}
- unshift (@INC, "$me/..");
+ unshift (@INC, $me);
}
use TeXLive::TLWinGoo;
@@ -37,7 +37,7 @@ sub win32
sub main
{
# get the db.
- my $Master = abs_path("$me/../..");
+ my $Master = abs_path("$me/.."); # another step up
# we have to
# - remove the entry of bin/arch from the PATH environment
@@ -45,11 +45,13 @@ sub main
# - (win32) remove the entry of PATHEXT
# - (unix) ... the links
if (win32()) {
- # remove any tex path and add an empty entry ... hope that does the
+ # remove any tex path and add an empty entry ... hope that does the
# right thing
- add_texbindir_to_path("");
+ #add_texbindir_to_path("");
+ remove_texbindirs_from_path();
unregister_script_type(".texlua");
- broadcast_env;
+ broadcast_env();
+ update_assocs();
# now remove all the OTHER dirs (nothing done here atm)
# ...
# remove all the directories ... howto do that on windows ...
diff --git a/Master/tlpkg/installer/uninstall-try.bat b/Master/tlpkg/installer/uninstall-try.bat
deleted file mode 100755
index b33fefde5cd..00000000000
--- a/Master/tlpkg/installer/uninstall-try.bat
+++ /dev/null
@@ -1,24 +0,0 @@
-@echo off
-
-rem TeX Live Root; ends with backslash
-rem This should also work with UNC names
-set tlsub=%~dp0
-set tldrive=%~d0
-
-%tldrive%
-cd %tlsub%
-
-rem use provided Perl
-
-set PERL5SAVE=%PERL5LIB%
-
-set PERL5LIB=%tlsub%..\tlperl\lib
-"%tlsub%..\tlperl\bin\perl" "%~dpn0.pl" %1 %2 %3 %4 %5 %6 %7 %8 %9
-rem pause Done
-
-rem cleanup in case of start from command-line
-
-set PERL5LIB=%PERL5SAVE%
-set PERL5SAVE=
-set tldrive=
-set tlsub=
diff --git a/Master/tlpkg/installer/uninstall-try.pl b/Master/tlpkg/installer/uninstall-try.pl
deleted file mode 100755
index 44d95fdab16..00000000000
--- a/Master/tlpkg/installer/uninstall-try.pl
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env perl
-
-# $Id: uninstall-tl.pl 6381 2008-01-23 17:50:54Z preining $
-# uninstall-tl.pl
-#
-# Copyright 2008 Norbert Preining, Siep Kroonenberg
-# This file is licensed under the GNU General Public License version 2
-# or any later version.
-#
-
-
-my $me;
-
-BEGIN {
- $^W = 1;
- $me=$0;
- $me=~s!\\!/!g if $^O=~/^MSWin(32|64)$/i;
- if ($me =~ m!/!) {
- $me=~s!(.*)/[^/]+/[^/]*$!$1!; # parent
- } else {
- $me='./..';
- }
- unshift (@INC, $me);
-}
-
-use TeXLive::TLWinGoo;
-use Cwd qw/abs_path/;
-use strict;
-
-&main ();
-
-sub win32
-{
- return ($^O=~/^MSWin(32|64)$/i ? 1 : 0);
-}
-
-sub main
-{
- # get the db.
- my $Master = abs_path("$me/.."); # another step up
-
- # we have to
- # - remove the entry of bin/arch from the PATH environment
- # - (win32) remove the .texlua association
- # - (win32) remove the entry of PATHEXT
- # - (unix) ... the links
- if (win32()) {
- # remove any tex path and add an empty entry ... hope that does the
- # right thing
- #add_texbindir_to_path("");
- remove_texbindirs_from_path();
- unregister_script_type(".texlua");
- broadcast_env();
- update_assocs();
- # now remove all the OTHER dirs (nothing done here atm)
- # ...
- # remove all the directories ... howto do that on windows ...
- } else {
- # remove the links (missings, but we do not support them in the installer
- # anyway
- # ...
- # remove all the directories
- system("rm -rf \"$Master/texmf-dist\"");
- system("rm -rf \"$Master/texmf-doc\"");
- system("rm -rf \"$Master/texmf-var\"");
- system("rm -rf \"$Master/texmf-config\"");
- system("rm -rf \"$Master/texmf\"");
- system("rm -rf \"$Master/bin\"");
- system("rm -rf \"$Master/tlpkg\"");
- system("rm -f \"$Master/install-tl.log\"");
- # now everything should be removed ...
- # note that shell returns 0 on success, so we have to use "and"
- system("rmdir \"$Master\"") and
- warn("Couldn't completely remove $Master: $!\n");
- }
-}
-
-
-__END__
-
-
-### Local Variables:
-### perl-indent-level: 2
-### tab-width: 2
-### indent-tabs-mode: nil
-### End:
-# vim:set tabstop=2 expandtab: #