title: Executing a script in MSYS2/MinGW
body: <p>On Windows, if I start <code>c:\msys64\mingw64.exe</code>, it opens a shell, where I can build my project, let's say by calling a <code>release</code> bash script (to simplify). Everything works fine.</p>
  
  <p>Now, I would like to execute my <code>release</code> script on <code>mingw64</code> directly, without interaction.</p>
  
  <p>I tried:</p>
  
  <pre><code>c:\msys64\mingw64.exe /c/the/full/path/release
  </code></pre>
  
  <p>A window opens and closes, it does not work.</p>
  
  <p>I attempted to use <code>bash</code> directly, but it seems the environment is not correctly set:</p>
  
  <pre><code>&gt; c:\msys64\usr\bin\bash -c ls
  /usr/bin/bash: ls: command not found
  
  &gt; c:\msys64\usr\bin\bash -c /bin/ls
  ... it works ...
  </code></pre>
  
  <p>So it is obvious that the environment is not the same as when execute <code>c:\msys64\mingw64.exe</code> then call <code>ls</code>.</p>
  
  <p>How to execute my <code>release</code> script as if I were in the shell started by <code>mingw64.exe</code>?</p>