-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmsys2_shell.bat
51 lines (38 loc) · 1.23 KB
/
msys2_shell.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
:
@echo off
rem ember value of GOTO: is used to know recursion has happened.
if "%1" == "GOTO:" goto %2
if NOT "x%WD%" == "x" set WD=
rem ember command.com only uses the first eight characters of the label.
goto _WindowsNT
start /min %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
rem ember that we execute here if we recursed.
:_Resume
for %%F in (1 2 3) do shift
if NOT EXIST %WD%msys-2.0.dll set WD=.\usr\bin\
rem ember that we get here even in command.com.
:_WindowsNT
if NOT EXIST %WD%msys-2.0.dll set WD=%~dp0usr\bin\
set MSYSTEM=MSYS
rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict
rem Set debugging program for errors
rem set MSYS=error_start:%WD%../../mingw32/bin/qtcreator.exe^|-debug^|^<process-id^>
set MSYSCON=mintty.exe
if "x%1" == "x-consolez" set MSYSCON=console.exe
if "x%1" == "x-mintty" set MSYSCON=mintty.exe
if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xconsole.exe" goto startconsolez
:startmintty
if NOT EXIST %WD%mintty.exe goto startsh
start %WD%mintty -i /msys2.ico /usr/bin/zsh --login %*
exit
:startconsolez
cd %WD%..\lib\ConsoleZ
start console -t "MSys2" -r "%*"
exit
:startsh
start %WD%sh --login -i %*
exit
:EOF