@echo off

rem ==== setup ====
setlocal
rem this contains trailing "\"
set SELFDIR=%~dp0
call %SELFDIR%xx_env.bat
set EXITCODE=0

rem ==== operations ====
rem for /F "tokens=2,3" %%A in (%LIST%) do (call %EXCOMMAND% %DLDIR%\%%A %MSYSDIR%\%%B & if errorlevel 1 goto failed)
for /F "tokens=2,3" %%A in (%LIST%) do (call %EXCOMMAND% %DLDIR%\%%A %MSYSDIR%\%%B & if ERRORLEVEL 1 goto failed)

echo INFO: extraction finished

goto end

rem ==== errors ====
:failed
echo ERROR: something wrong while extraction
set EXITCODE=1
goto end


:end
pause
exit /b %EXITCODE%
endlocal
