Skip to content

Instantly share code, notes, and snippets.

@for2ando
Created July 5, 2022 15:18
Show Gist options
  • Save for2ando/2d27d229be3828fd9c6141482813a16b to your computer and use it in GitHub Desktop.
Save for2ando/2d27d229be3828fd9c6141482813a16b to your computer and use it in GitHub Desktop.
Msys2: A MSYSTEM selection & go script.
@echo off
:input
echo 1. msys2
echo 2. mingw32
echo 3. mingw64
echo 4. clang64
echo 5. ucrt64
echo 0. quit
set /p menu="Which ? "
if %menu%/ == / goto input
if %menu%/ == 0/ goto end
if %menu%/ == 1/ set arg=msys & goto shell
if %menu%/ == 2/ set arg=mingw32 & goto shell
if %menu%/ == 3/ set arg=mingw64 & goto shell
if %menu%/ == 4/ set arg=clang64 & goto shell
if %menu%/ == 5/ set arg=ucrt64 & goto shell
goto input
:shell
%MSYS%\msys2_shell.cmd -%arg% %*
:end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment