-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.cmd
More file actions
22 lines (16 loc) · 792 Bytes
/
Copy pathpackage.cmd
File metadata and controls
22 lines (16 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@SETLOCAL ENABLEEXTENSIONS
@ECHO OFF
REM Generic .sh script wrapper using MINGW.
REM The .sh script that is ran is matched against the file name of this wrapper (hash.cmd -> hash.sh)
REM All arguments passed to this script is passed to the .sh script.
REM %ERRORLEVEL% will be set to the return code that the .sh script returned.
SET "DP0=%~dp0"
SET "DP0=%DP0:~0,-1%"
SET "SH=C:\msys64\msys2_shell.cmd"
IF NOT "_%MSYS2_SHELL%" == "_" SET "SH=%MSYS2_SHELL%"
IF NOT EXIST "%SH%" GOTO :NOMINGW
CALL "%SH%" -clang64 -defterm -where "%DP0%" -no-start -shell bash -c "SA=($SHELL_ARGS) && ""$PWD/%~n0.sh"" ${SA[@]:5}" %*
EXIT /B %ERRORLEVEL%
:NOMINGW
ECHO ERROR: Please install MSYS2 from https://www.msys2.org or set environment variable MSYS2_SHELL to the path to msys2_shell.cmd.
EXIT /B 1