summaryrefslogtreecommitdiff
path: root/Master/bin
diff options
context:
space:
mode:
authorPiotr Strzelczyk <piotr@eps.gda.pl>2009-08-03 15:04:46 +0000
committerPiotr Strzelczyk <piotr@eps.gda.pl>2009-08-03 15:04:46 +0000
commit330853d14e08ad9d787d7b0ad1d2b4907e6ace5a (patch)
tree0981c6cca25aca1182c2c3f0d43721501f1e1128 /Master/bin
parent660ccf0ff17bb81dd62bcb21838d12ba95778c46 (diff)
fixes for tlmgr restart in GUI mode and double backslashes in paths
git-svn-id: svn://tug.org/texlive/trunk@14520 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin')
-rwxr-xr-xMaster/bin/win32/tlmgr.bat22
1 files changed, 11 insertions, 11 deletions
diff --git a/Master/bin/win32/tlmgr.bat b/Master/bin/win32/tlmgr.bat
index 03536cb9c88..2d411d1a92d 100755
--- a/Master/bin/win32/tlmgr.bat
+++ b/Master/bin/win32/tlmgr.bat
@@ -7,32 +7,32 @@ rem Originally written 2009 by Tomasz M. Trzeciak
rem Make environment changes local
setlocal enableextensions
-rem Get TL installation root (it should be two levels up)
-for %%I in ("%~dp0..\..") do (set tlroot=%%~fI)
+rem Get TL installation root (w/o trailing backslash)
+set tlroot=%~dp0:
+set tlroot=%tlroot:\bin\win32\:=%
rem Remove remains of previous update if any
-(set tlupdatername=updater-w32)
-(set tlupdater=%tlroot%\temp\%tlupdatername%)
-if exist "%tlupdater%*" del "%tlupdater%*"
-if exist "%tlupdater%*" goto :err_updater_exists
+set tlupdater=%tlroot%\temp\updater-w32
+if exist "%tlupdater%" del "%tlupdater%"
+if exist "%tlupdater%" goto :err_updater_exists
rem Start tlmgr
-(set PERL5LIB=%tlroot%\tlpkg\tlperl\lib)
+set PERL5LIB=%tlroot%\tlpkg\tlperl\lib
path %tlroot%\tlpkg\tlperl\bin;%tlroot%\bin\win32;%path%
perl "%tlroot%\texmf\scripts\texlive\tlmgr.pl" %*
rem Finish if there are no updates to do; the last error code will be returned
if not exist "%tlupdater%" goto :eof
rem Rename updater script before it is run
-ren "%tlupdater%" "%tlupdatername%.bat">nul
+move /y "%tlupdater%" "%tlupdater%.bat">nul
if errorlevel 1 goto :err_rename_updater
rem Run updater
-endlocal & call "%tlupdater%.bat" & goto :eof
+call "%tlupdater%.bat" & goto :eof
:err_updater_exists
-echo %~nx0: updater script detected, infrastructure update might be running>&2
+echo %~nx0: locked updater script detected, infrastructure update might be running>&2
exit /b 1
:err_rename_updater
-echo %~nx0: cannot rename "%tlupdater%" to "%tlupdatername%.bat">&2
+echo %~nx0: failed to move "%tlupdater%">&2
exit /b 1