summaryrefslogtreecommitdiff
path: root/Master/bin/win32/tlmgr.bat
diff options
context:
space:
mode:
Diffstat (limited to 'Master/bin/win32/tlmgr.bat')
-rwxr-xr-xMaster/bin/win32/tlmgr.bat28
1 files changed, 22 insertions, 6 deletions
diff --git a/Master/bin/win32/tlmgr.bat b/Master/bin/win32/tlmgr.bat
index fe949613d7c..3227c961498 100755
--- a/Master/bin/win32/tlmgr.bat
+++ b/Master/bin/win32/tlmgr.bat
@@ -1,8 +1,24 @@
@echo off
-rem tl-w32-starter.bat
-rem universal script starter, batch file part
-rem this program calls the tl-w32-wrapper.texlua
+rem Advanced started for tlmgr2 with auto-update
+rem Copyright 2009 by Tomasz M. Trzeciak <t.m.trzeciak@googlemail.com>
+rem Public Domain
+rem
+
setlocal
-set ownpath=%~dp0%
-texlua "%ownpath%tl-w32-wrapper.texlua" "%~dpn0" %*
-endlocal
+rem TL installation root
+for %%P in ("%~dp0..\..") do set "tlroot=%%~fP"
+
+rem Start tlmgr
+set PERL5LIB=%tlroot%\tlpkg\tlperl\lib
+"%tlroot%\tlpkg\tlperl\bin\perl.exe" "%tlroot%\texmf\scripts\texlive\tlmgr2.pl" %*
+
+rem Check for updater script
+set "updater=%tlroot%\tlpkg\installer\updater.bat"
+if not exist "%updater%" exit /b
+if exist "%updater%.bat" del "%updater%.bat"
+ren "%updater%" updater.bat.bat
+if errorlevel 1 exit /b 1
+
+rem Run updater script
+endlocal & call "%updater%.bat" & exit /b
+