Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-30 Thread Christian Franke
Corinna Vinschen wrote: On Aug 26 18:23, Christian Franke wrote: Traditionally setup.exe creates the /cygwin.bat file as follows if C:\cygwin is the install directory: - @echo off C: chdir C:\cygwin\bin bash --login -i - The following should work since WinXP regardless of install dir

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-30 Thread Andrey Repin
Greetings, cyg Simple! >>> On 8/27/2016 1:44 PM, Andrey Repin wrote: Greetings, Christian Franke! > Andrey Repin wrote: >>> Hmm... therefore it is also better to change the last line to: >>> .\bash --login -i >> "%~dp0bin\bash.exe" --login -i > Changing the d

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-30 Thread cyg Simple
On 8/29/2016 9:58 AM, Andrey Repin wrote: > Greetings, cyg Simple! > > > >> On 8/27/2016 1:44 PM, Andrey Repin wrote: >>> Greetings, Christian Franke! >>> Andrey Repin wrote: >> Hmm... therefore it is also better to change the last line to: >> .\bash --login -i > "%~dp0bin\b

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-30 Thread Corinna Vinschen
On Aug 26 18:23, Christian Franke wrote: > Traditionally setup.exe creates the /cygwin.bat file as follows if C:\cygwin > is the install directory: > - > @echo off > > C: > chdir C:\cygwin\bin > > bash --login -i > - > > > The following should work since WinXP regardless of install dire

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-30 Thread Corinna Vinschen
On Aug 27 19:12, Andrey Repin wrote: > Greetings, Christian Franke! > > > Andrey Repin wrote: > >> ... > >> Why so complicated? > >> > >> @START "" /B "%~dp0bin\mintty.exe" - > >> > >> Done. > > > Possibly not. This does not run bash in current console. It starts a new > > mintty Window. > > Wh

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-29 Thread Andrey Repin
Greetings, cyg Simple! > On 8/27/2016 1:44 PM, Andrey Repin wrote: >> Greetings, Christian Franke! >> >>> Andrey Repin wrote: > Hmm... therefore it is also better to change the last line to: > .\bash --login -i "%~dp0bin\bash.exe" --login -i >> >>> Changing the directory befor

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-29 Thread cyg Simple
On 8/27/2016 1:44 PM, Andrey Repin wrote: > Greetings, Christian Franke! > >> Andrey Repin wrote: Hmm... therefore it is also better to change the last line to: .\bash --login -i >>> "%~dp0bin\bash.exe" --login -i > >> Changing the directory before bash is run is a security measur

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-27 Thread Andrey Repin
Greetings, Christian Franke! > Andrey Repin wrote: >>> Hmm... therefore it is also better to change the last line to: >>> .\bash --login -i >> "%~dp0bin\bash.exe" --login -i > Changing the directory before bash is run is a security measure because > the current directory may be in DLL search

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-27 Thread Christian Franke
Andrey Repin wrote: Hmm... therefore it is also better to change the last line to: .\bash --login -i "%~dp0bin\bash.exe" --login -i Changing the directory before bash is run is a security measure because the current directory may be in DLL search path. I guess this is one reason why the

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-27 Thread Andrey Repin
Greetings, Christian Franke! >> Also don't see why so complicated. While staying in the console, how >> about: >> - >> @echo off >> >> cd /d "%~dp0\bin" >> >> bash --login -i >> - > An errorlevel check is IMO mandatory after a cd command. Absolutely unnecessary. --login will change the C

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-27 Thread Andrey Repin
Greetings, Christian Franke! > Andrey Repin wrote: >> ... >> Why so complicated? >> >> @START "" /B "%~dp0bin\mintty.exe" - >> >> Done. > Possibly not. This does not run bash in current console. It starts a new > mintty Window. Who in their right mind would want a bogus native console? You? Ok,

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-27 Thread Bengt Larsson
Christian Franke wrote: >Bengt Larsson wrote: >> - >> @echo off >> >> cd /d "%~dp0\bin" >> >> bash --login -i >> - > >An errorlevel check is IMO mandatory after a cd command. Otherwise >another bash in the PATH might be started if the directory does not exist. >Hmm... therefore it is also

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-27 Thread Thomas Wolff
Am 27.08.2016 um 13:24 schrieb Christian Franke: Bengt Larsson wrote: Andrey Repin wrote: The following should work since WinXP regardless of install directory: - @echo off cd /d %~dp0 if errorlevel 1 exit /b 1 cd bin if errorlevel 1 exit /b 1 bash --login -i - Why so complicated? A

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-27 Thread Christian Franke
Andrey Repin wrote: ... Why so complicated? @START "" /B "%~dp0bin\mintty.exe" - Done. Possibly not. This does not run bash in current console. It starts a new mintty Window. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentat

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-27 Thread Christian Franke
Bengt Larsson wrote: Andrey Repin wrote: The following should work since WinXP regardless of install directory: - @echo off cd /d %~dp0 if errorlevel 1 exit /b 1 cd bin if errorlevel 1 exit /b 1 bash --login -i - Why so complicated? Also don't see why so complicated. While staying in

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-27 Thread Bengt Larsson
Andrey Repin wrote: >Greetings, Christian Franke! > >> Traditionally setup.exe creates the /cygwin.bat file as follows if >> C:\cygwin is the install directory: >> - >> @echo off > >> C: >> chdir C:\cygwin\bin > >> bash --login -i >> - > > >> The following should work since WinXP regardles

Re: Proposal for new cygwin.bat which is independent from install directory

2016-08-26 Thread Andrey Repin
Greetings, Christian Franke! > Traditionally setup.exe creates the /cygwin.bat file as follows if > C:\cygwin is the install directory: > - > @echo off > C: > chdir C:\cygwin\bin > bash --login -i > - > The following should work since WinXP regardless of install directory: > - > @

Proposal for new cygwin.bat which is independent from install directory

2016-08-26 Thread Christian Franke
Traditionally setup.exe creates the /cygwin.bat file as follows if C:\cygwin is the install directory: - @echo off C: chdir C:\cygwin\bin bash --login -i - The following should work since WinXP regardless of install directory: - @echo off cd /d %~dp0 if errorlevel 1 exit /b 1 cd