This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Proposal for new cygwin.bat which is independent from install directory
- From: Bengt Larsson <lists dot cygwin4 at bengtl dot net>
- To: cygwin at cygwin dot com
- Date: Sat, 27 Aug 2016 12:28:22 +0200
- Subject: Re: Proposal for new cygwin.bat which is independent from install directory
- Authentication-results: sourceware.org; auth=none
- References: <57C06CFA.4060405@t-online.de> <1974732522.20160826193931@yandex.ru>
- Reply-to: cygwin at cygwin dot com
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 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 the console, how
about:
-----
@echo off
cd /d "%~dp0\bin"
bash --login -i
-----
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple