@echo off

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

pushd "%LISTDIR%"

rem ==== operations ====
for /F "eol=# 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
popd
pause
exit /b %EXITCODE%
endlocal
