diff options
author | Norbert Preining <preining@logic.at> | 2009-02-12 12:08:37 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-02-12 12:08:37 +0000 |
commit | 08436e407b18df915e3ea94b263a737ee65b9905 (patch) | |
tree | 5087825a1ff80c10d15405deb5547e2b9f0c7364 /Master/texmf | |
parent | aab3110f5b194cc3a5d4e083e9fddfa812d14533 (diff) |
commit Tomek's changes plus renaming the updater to updater-w32
git-svn-id: svn://tug.org/texlive/trunk@12152 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 8 | ||||
-rw-r--r-- | Master/texmf/scripts/texlive/updater-w32.bat (renamed from Master/texmf/scripts/texlive/w32_updater.bat) | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 0e7d4a4d633..4c7253fe2c6 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -1198,13 +1198,15 @@ sub write_w32_updater { } return 0 if ($opts{"dry-run"}); # nothing else to do # write the updater script file - open UPDATER, ">$root/texmf/scripts/texlive/updater" + open UPDATER, ">$root/temp/run-updater-w32" or die "Cannot create updater: $!"; print UPDATER '@echo off setlocal enableextensions (set errorlevel=) -call "%~dp0w32_updater" ' . join(' ',@updater_args) . ' -start /b cmd /c del "%~f0" & exit /b %errorlevel%'; +>nul copy /y "%~dp0..\texmf\scripts\texlive\updater-w32.bat" "%~dp0updater-w32.bat" +call "%~dp0updater-w32" ' . join(' ',@updater_args) . ' +if errorlevel 1 call exit /b %%errorlevel%% +start /b cmd /c del "%~f0" "%~dp0updater-w32.bat"'; close UPDATER; return 0; } diff --git a/Master/texmf/scripts/texlive/w32_updater.bat b/Master/texmf/scripts/texlive/updater-w32.bat index cbd8982c6f3..0482f1d2d84 100644 --- a/Master/texmf/scripts/texlive/w32_updater.bat +++ b/Master/texmf/scripts/texlive/updater-w32.bat @@ -47,7 +47,7 @@ if not exist "%logdir%\" (set logdir=temp) rem cd to root cd /d "%tlroot%" rem create tar.exe backup ->nul copy /y "tlpkg\installer\tar.exe" "tlpkg\installer\tarsave.exe" +>nul copy /y tlpkg\installer\tar.exe temp\w32_tar.exe rem set up perl environment set "PERL5LIB=%tlroot%\tlpkg\tlperl\lib" rem let's make sure that we can use dynamic variables @@ -94,7 +94,7 @@ rem Evil has taken over - emit adequate exit code exit /b 666 :finish -2>nul del tlpkg\installer\tarsave.exe temp\__BACKUP_* +2>nul del temp\w32_tar.exe temp\__BACKUP_* exit /b %exitcode% REM SUBROUTINES @@ -112,7 +112,7 @@ goto :pkgloop :untar temp\[__BACKUP_] pkg_name set "ext=tar" if %~n1_==__BACKUP__ set "ext=r%~3.tar" -tlpkg\installer\tarsave.exe -x -f "%~1%~2.%ext%" && del "%~1%~2.%ext%" +temp\w32_tar.exe -x -f "%~1%~2.%ext%" && del "%~1%~2.%ext%" exit /b %errorlevel% :incltlpobj tlpkg\tlpobj\ pkg_name @@ -141,4 +141,4 @@ exit /b 0 >temp\errorpopup.vbs echo CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptFullName) : MsgBox Replace("%~2","\n",Chr(10)), 16, "%~1" wscript temp\errorpopup.vbs rem del temp\errorpopup.vbs -exit /b 0
\ No newline at end of file +exit /b 0 |