PageRenderTime 94ms CodeModel.GetById 83ms app.highlight 8ms RepoModel.GetById 0ms app.codeStats 0ms

/build-extras/MSYS_files/msys.bat

https://code.google.com/p/camelbox/
Batch | 136 lines | 119 code | 17 blank | 0 comment | 45 complexity | c932c69756730d21e85955fd16535d40 MD5 | raw file
  1@echo off
  2rem Copyright (C):  2001, 2002  Earnie Boyd

  3rem   mailto:earnie@users.sf.net

  4rem This file is part of Minimal SYStem

  5rem   http://www.mingw.org/msys.shtml

  6rem

  7rem File:	    msys.bat

  8rem Revision:	    2.0

  9rem Revision Date:  April 17th, 2002

 10
 11rem ember to set the "Start in:" field of the shortcut.

 12rem A value similar to C:\msys\1.0\bin is what the "Start in:" field needs

 13rem to represent.

 14
 15rem ember value of GOTO: is used to know recursion has happened.

 16if "%1" == "GOTO:" goto %2

 17
 18rem ember command.com only uses the first eight characters of the label.

 19goto _WindowsNT

 20
 21rem ember that we only execute here if we are in command.com.

 22:_Windows

 23
 24if "x%COMSPEC%" == "x" set COMSPEC=command.com
 25start %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 26goto EOF

 27
 28rem ember that we execute here if we recursed.

 29:_Resume

 30for %%F in (1 2 3) do shift
 31
 32rem ember that we get here even in command.com.

 33:_WindowsNT

 34
 35if "x%MSYSTEM%" == "x" set MSYSTEM=MINGW32
 36if "%1" == "MSYS" set MSYSTEM=MSYS
 37
 38if NOT "x%DISPLAY%" == "x" set DISPLAY=
 39
 40if EXIST bin\nul cd bin
 41if EXIST rxvt.exe goto startrxvt

 42if EXIST sh.exe goto startsh

 43
 44echo Cannot find the rxvt.exe or sh.exe binary -- aborting.
 45pause
 46exit 1
 47
 48rem If you don't want to use rxvt then rename the file rxvt.exe to something

 49rem else.  Then sh.exe will be used instead.

 50:startrxvt

 51
 52rem Setup the default colors for rxvt.

 53if "x%MSYSBGCOLOR%" == "x" set MSYSBGCOLOR=White
 54if "x%MSYSFGCOLOR%" == "x" set MSYSFGCOLOR=Black
 55rem if "x%MINGW32BGCOLOR%" == "x" set MINGW32BGCOLOR=LightYellow

 56rem if "x%MINGW32FGCOLOR%" == "x" set MINGW32FGCOLOR=Navy

 57if "x%MINGW32BGCOLOR%" == "x" set MINGW32BGCOLOR=Black
 58if "x%MINGW32FGCOLOR%" == "x" set MINGW32FGCOLOR=White
 59if "%MSYSTEM%" == "MSYS" set BGCOLOR=%MSYSBGCOLOR%
 60if "%MSYSTEM%" == "MSYS" set FGCOLOR=%MSYSFGCOLOR%
 61if "%MSYSTEM%" == "MINGW32" set BGCOLOR=%MINGW32BGCOLOR%
 62if "%MSYSTEM%" == "MINGW32" set FGCOLOR=%MINGW32FGCOLOR%
 63
 64start rxvt -backspacekey  -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i
 65exit
 66
 67:startsh

 68start sh --login -i
 69exit
 70
 71:EOF

 72
 73rem ChangeLog:

 74rem 2002.03.07  Earnie Boyd  mailto:earnie@users.sf.net

 75rem	* Move the @echo off to the top.

 76rem	* Change the binmode setting to nobinmode.

 77rem     * Remove the angle brackets around email address to workaround MS 

 78rem	buggy command processor.

 79rem

 80rem 2002.03.12  Earnie Boyd  mailto:earnie@users.sf.net

 81rem	* Add filter logic to find rxvt.exe

 82rem

 83rem 2002.03.13  Earnie Boyd  mailto:earnie@users.sf.net

 84rem	* Revert the nobinmode change.

 85rem

 86rem 2002.03.20  Earnie Boyd  mailto:earnie@users.sf.net

 87rem     * Add logic for stating bash.

 88rem

 89rem 2002.04.11  Earnie Boyd  mailto;earnie@users.sf.net

 90rem	* Add logic for setting MSYSTEM value based on parameter.

 91rem

 92rem 2002.04.15  Olivier Gautherot  mailto:olivier_gautherot@mentorg.com

 93rem	* Reduce number test conditions for finding an executable.

 94rem

 95rem 2002.04.15  Earnie Boyd  mailto:earnie@users.sf.net

 96rem	* Unset DISPLAY if set before starting shell.

 97rem

 98rem 2002.04.16  Earnie Boyd  mailto:earnie@users.sf.net

 99rem	* Remove use of DEFINED in conditional statments for variables for

100rem	command.com support.

101rem	* Add check for nonexistance of USERNAME variable for Win9x support.

102rem

103rem 2002.04.17  Earnie Boyd  mailto:earnie@users.sf.net

104rem	* Add foreground and background color defaults based on MSYSTEM value.

105rem

106rem 2002.04.22  Earnie Boyd  mailto:earnie@users.sf.net

107rem	* More Win 9x changes.

108rem

109rem 2002.05.04  Earnie Boyd  mailto:earnie@users.sf.net

110rem	* Remove the SET of USERNAME and HOME.

111rem

112rem 2002.11.18  Earnie Boyd  mailto:earnie@users.sf.net

113rem	* Add command.com detection and restart with a larger environment to

114rem	avoid errors on w9x.

115rem     Many thanks to Randy W. Sims mailto:RandyS@ThePierianSpring.org.

116rem	See Randy's response to "RE: [Mingw-msys] Installation on WindowsME" 

117rem	from 11/06/2002 in the archives of mingw-msys@lists.sf.net.

118rem

119rem 2002.11.19  Paul Garceau  mailto:pgarceau@attbi.com

120rem	* Fix a typo: Change COMPSPEC to COMSPEC.

121rem

122rem 2002.11.25  Earnie Boyd  mailto:earnie@users.sf.net

123rem	* Remove the SET CYGWIN since it doesn't matter any longer.

124rem

125rem 2003.02.03  Earnie Boyd  mailto:earnie@users.sf.net

126rem	* Win9x doesn't like ``EXISTS dir'' so change it to ``EXISTS dir\nul''.

127rem	Thanks to Nicolas Weber mailto:nicolasweber@gmx.de.

128rem

129rem 2003.03.06  Earnie Boyd  mailto:earnie@users.sf.net

130rem	* Add -backspacekey switch to rxvt startup.

131rem	* Move RXVT color setup to startrxvt label

132rem

133rem 2004.01.30  Earnie Boyd  mailto:earnie@users.sf.net

134rem	* Add -geometry parameter to work around an off by one issue with

135rem       the default values.

136rem	Thanks to Dave Schuyler mailto:parameter@users.sf.net