<commit_before>@cd "%~dp0"
@cd ..\..\
@for %%a in ("%cd%") do @set devroot=%%~sa
@set projectname=mesa-dist-win
@call %devroot%\%projectname%\buildscript\modules\msys.cmd
@call %devroot%\%projectname%\buildscript\modules\msysupdate.cmd
@call %devroot%\%projectname%\buildscript\modules\git.cmd
@IF %msysstate% EQU 0 (
@echo Fatal error: MSYS2 is missing.
@pause
@exit
)

:selectshell
@echo Select shell:
@echo 1. MSYS2 (default)
@echo 2. MINGW32
@echo 3. MINGW64
@echo 4. CLANG32
@echo 5. CLANG64
@echo 6. UCRT64
@set "shell="
@set /p shell=Enter choice:
@echo.
@if "%shell%"=="" set shell=1
@IF "%shell%"=="1" set "MSYSTEM="
@IF "%shell%"=="2" set MSYSTEM=MINGW32
@IF "%shell%"=="3" set MSYSTEM=MINGW64
@IF "%shell%"=="4" set MSYSTEM=CLANG32
@IF "%shell%"=="4" %msysloc%\usr\bin\bash --login -c "$(/usr/bin/cygpath -m ${devroot})/${projectname}/buildscript/modules/clang32.sh"
@IF "%shell%"=="5" set MSYSTEM=CLANG64
@IF "%shell%"=="6" set MSYSTEM=UCRT64
@IF NOT "%shell%"=="1" IF NOT "%shell%"=="2" IF NOT "%shell%"=="3" IF NOT "%shell%"=="4" IF NOT "%shell%"=="5" IF NOT "%shell%"=="6" GOTO selectshell

:command
@set msyscmd=
@set /p msyscmd=Enter MSYS2 command:
@echo.
@set msyscmd=%msyscmd:"=%
@set msyscmd=%msyscmd:\=/%
@IF /I "%msyscmd%"=="exit" exit
@IF /I "%msyscmd%"=="shell" GOTO selectshell
@IF /I "%msyscmd%"=="clearcache" %msysloc%\usr\bin\bash --login -c "pacman -Sc --noconfirm"
@IF /I "%msyscmd%"=="clearcache" for /f "tokens=*" %%a in ('dir /B "%msysloc%\var\cache\pacman\pkg"') do @for /f "tokens=1 delims=-" %%b in ("%%a") DO @IF NOT "%%b"=="bison" IF NOT "%%b"=="flex" IF NOT "%%b"=="m4" IF NOT "%%b"=="mingw" IF NOT "%%b"=="patch" IF NOT "%%b"=="tar" del %msysloc%\var\cache\pacman\pkg\%%a
@IF /I "%msyscmd%"=="cleancache" %msysloc%\usr\bin\bash --login -c "pacman -Sc --noconfirm"
@IF /I "%msyscmd%"=="clearcache" for /f "tokens=*" %%a in ('dir /B "%msysloc%\var\cache\pacman\pkg"') do @for /f "tokens=1 delims=-" %%b in ("%%a") DO @IF NOT "%%b"=="bison" IF NOT "%%b"=="flex" IF NOT "%%b"=="m4" IF NOT "%%b"=="mingw" IF NOT "%%b"=="patch" IF NOT "%%b"=="tar" del %msysloc%\var\cache\pacman\pkg\%%a
@IF /I "%msyscmd%"=="setup" IF %shell% EQU 1 %msysloc%\usr\bin\bash --login -c "pacman -S flex bison patch tar mingw-w64-i686-{python-mako,meson,pkgconf,vulkan-devel,libelf,zstd,gdb,llvm,cc} mingw-w64-x86_64-{python-mako,meson,pkgconf,vulkan-devel,libelf,zstd,gdb,llvm,cc} --needed"
@IF /I "%msyscmd%"=="setup" IF %shell% GTR 1 %msysloc%\usr\bin\bash --login -c "pacman -S flex bison patch tar ${MINGW_PACKAGE_PREFIX}-{python-mako,meson,pkgconf,vulkan-devel,libelf,zstd,gdb,llvm,cc} --needed"
@IF %gitstate% GTR 0 IF /I NOT "%msyscmd%"=="clearcache" IF /I NOT "%msyscmd%"=="cleancache" IF /I NOT "%msyscmd%"=="setup" %msysloc%\usr\bin\bash --login -c "PATH=${PATH}:${gitloc};%msyscmd%"
@IF %gitstate% EQU 0 IF /I NOT "%msyscmd%"=="clearcache" IF /I NOT "%msyscmd%"=="cleancache" IF /I NOT "%msyscmd%"=="setup" %msysloc%\usr\bin\bash --login -c "%msyscmd%"
@echo.
@GOTO command<commit_msg>Fix a typo in MSYS2 debug causing MSYS package removal from cache to fail with cleancache command but not with clearcache command Fixes 56eeeb30<commit_after>@cd "%~dp0"
@cd ..\..\
@for %%a in ("%cd%") do @set devroot=%%~sa
@set projectname=mesa-dist-win
@call %devroot%\%projectname%\buildscript\modules\msys.cmd
@call %devroot%\%projectname%\buildscript\modules\msysupdate.cmd
@call %devroot%\%projectname%\buildscript\modules\git.cmd
@IF %msysstate% EQU 0 (
@echo Fatal error: MSYS2 is missing.
@pause
@exit
)

:selectshell
@echo Select shell:
@echo 1. MSYS2 (default)
@echo 2. MINGW32
@echo 3. MINGW64
@echo 4. CLANG32
@echo 5. CLANG64
@echo 6. UCRT64
@set "shell="
@set /p shell=Enter choice:
@echo.
@if "%shell%"=="" set shell=1
@IF "%shell%"=="1" set "MSYSTEM="
@IF "%shell%"=="2" set MSYSTEM=MINGW32
@IF "%shell%"=="3" set MSYSTEM=MINGW64
@IF "%shell%"=="4" set MSYSTEM=CLANG32
@IF "%shell%"=="4" %msysloc%\usr\bin\bash --login -c "$(/usr/bin/cygpath -m ${devroot})/${projectname}/buildscript/modules/clang32.sh"
@IF "%shell%"=="5" set MSYSTEM=CLANG64
@IF "%shell%"=="6" set MSYSTEM=UCRT64
@IF NOT "%shell%"=="1" IF NOT "%shell%"=="2" IF NOT "%shell%"=="3" IF NOT "%shell%"=="4" IF NOT "%shell%"=="5" IF NOT "%shell%"=="6" GOTO selectshell

:command
@set msyscmd=
@set /p msyscmd=Enter MSYS2 command:
@echo.
@set msyscmd=%msyscmd:"=%
@set msyscmd=%msyscmd:\=/%
@IF /I "%msyscmd%"=="exit" exit
@IF /I "%msyscmd%"=="shell" GOTO selectshell
@IF /I "%msyscmd%"=="clearcache" %msysloc%\usr\bin\bash --login -c "pacman -Sc --noconfirm"
@IF /I "%msyscmd%"=="clearcache" for /f "tokens=*" %%a in ('dir /B "%msysloc%\var\cache\pacman\pkg"') do @for /f "tokens=1 delims=-" %%b in ("%%a") DO @IF NOT "%%b"=="bison" IF NOT "%%b"=="flex" IF NOT "%%b"=="m4" IF NOT "%%b"=="mingw" IF NOT "%%b"=="patch" IF NOT "%%b"=="tar" del %msysloc%\var\cache\pacman\pkg\%%a
@IF /I "%msyscmd%"=="cleancache" %msysloc%\usr\bin\bash --login -c "pacman -Sc --noconfirm"
@IF /I "%msyscmd%"=="cleancache" for /f "tokens=*" %%a in ('dir /B "%msysloc%\var\cache\pacman\pkg"') do @for /f "tokens=1 delims=-" %%b in ("%%a") DO @IF NOT "%%b"=="bison" IF NOT "%%b"=="flex" IF NOT "%%b"=="m4" IF NOT "%%b"=="mingw" IF NOT "%%b"=="patch" IF NOT "%%b"=="tar" del %msysloc%\var\cache\pacman\pkg\%%a
@IF /I "%msyscmd%"=="setup" IF %shell% EQU 1 %msysloc%\usr\bin\bash --login -c "pacman -S flex bison patch tar mingw-w64-i686-{python-mako,meson,pkgconf,vulkan-devel,libelf,zstd,gdb,llvm,cc} mingw-w64-x86_64-{python-mako,meson,pkgconf,vulkan-devel,libelf,zstd,gdb,llvm,cc} --needed"
@IF /I "%msyscmd%"=="setup" IF %shell% GTR 1 %msysloc%\usr\bin\bash --login -c "pacman -S flex bison patch tar ${MINGW_PACKAGE_PREFIX}-{python-mako,meson,pkgconf,vulkan-devel,libelf,zstd,gdb,llvm,cc} --needed"
@IF %gitstate% GTR 0 IF /I NOT "%msyscmd%"=="clearcache" IF /I NOT "%msyscmd%"=="cleancache" IF /I NOT "%msyscmd%"=="setup" %msysloc%\usr\bin\bash --login -c "PATH=${PATH}:${gitloc};%msyscmd%"
@IF %gitstate% EQU 0 IF /I NOT "%msyscmd%"=="clearcache" IF /I NOT "%msyscmd%"=="cleancache" IF /I NOT "%msyscmd%"=="setup" %msysloc%\usr\bin\bash --login -c "%msyscmd%"
@echo.
@GOTO command
{'fraction_non_alphanumeric': 0.23868181091025437, 'fraction_numerical': 0.02191649336106223, 'mean_word_length': 4.832089552238806, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2186062', 'n_tokens_mistral': 2957, 'n_tokens_neox': 2740, 'n_words': 654}