@echo off

setlocal
rem this includes trailing "\"
set SELFDIR=%~dp0
call %SELFDIR%xx_env.bat

echo "---- remove gcc"
if exist %GCCDIR% rd /S /Q %GCCDIR%

echo "---- remove bin"
if exist %MSYSDIR%\bin rd /S /Q %MSYSDIR%\bin
echo "---- remove doc"
if exist %MSYSDIR%\doc rd /S /Q %MSYSDIR%\doc
echo "---- remove etc"
if exist %MSYSDIR%\etc rd /S /Q %MSYSDIR%\etc
echo "---- remove include"
if exist %MSYSDIR%\include rd /S /Q %MSYSDIR%\include
echo "---- remove lib"
if exist %MSYSDIR%\lib rd /S /Q %MSYSDIR%\lib
echo "---- remove mingw"
if exist %MSYSDIR%\mingw rd /S /Q %MSYSDIR%\mingw
echo "---- remove postinstall"
if exist %MSYSDIR%\postinstall rd /S /Q %MSYSDIR%\postinstall
echo "---- remove share"
if exist %MSYSDIR%\share rd /S /Q %MSYSDIR%\share

call %SELFDIR%06_cleanup.bat nonstop

pause
