delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/08/26/12:50:39

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=rzgiedQydxaW2cbm
b8wn8L6voWTCcuRFGxUsDrBnTvDVTc2GgAf2Un9QgYeNxoYyqjlkkQ/UOcBgWNMu
nEwSEEEL/VedfGwnmQMhfvIuOU3nhDKMsGDuHNJWyPHaimZhvCH7Npli8Rjn8NON
jA7dkrZWqaMExmV9BW58WUWGaLQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=RH7vJp/R7uclItmDM/wh3E
3GRJ4=; b=Zr6eG5OZUXemPeALM80q2rxZYqWbbjx7X80SXsmHMSBV0+rYtg9nn9
uVs6ftL9KRRy7NnCQKufaLIBtZsng9dz+Ksgt3IhNwBTt6jSSeDPAJzGaeQXVz+h
yZbGHQl9Jcb0z/S7VewC9UKti/26lrygMa3YOi8OAPPBwcta26Akc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.0 required=5.0 tests=BAYES_50,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*F:D*yandex.ru, yandexru, UD:yandex.ru, yandex.ru
X-HELO: forward2h.cmail.yandex.net
Authentication-Results: smtp1o.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-Suid-Status: 1 0,1 0
Date: Fri, 26 Aug 2016 19:39:31 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <1974732522.20160826193931@yandex.ru>
To: Christian Franke <Christian DOT Franke AT t-online DOT de>, cygwin AT cygwin DOT com
Subject: Re: Proposal for new cygwin.bat which is independent from install directory
In-Reply-To: <57C06CFA.4060405@t-online.de>
References: <57C06CFA DOT 4060405 AT t-online DOT de>
MIME-Version: 1.0
X-IsSubscribed: yes

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?

@START "" /B "%~dp0bin\mintty.exe" -

Done.

> I would suggest to add something like the above as 
> "/etc/defaults/cygwin.bat" to base-files package. The postinstall script 
> should copy it to "/cygwin.bat" if new. The creation of this file could 
> later be removed from setup.exe.

> This more generic cygwin.bat is in particular useful for 'portable' 
> installations of Cygwin on an USB device. I occasionally use such a 
> installation to make rescue tools (dd, ddrescue, fdisk, hexedit, 
> sleuthkit, ...) available to the minimal system provided by a Windows 
> system repair CD.

Your variant is overengineered.


-- 
With best regards,
Andrey Repin
Friday, August 26, 2016 19:37:08

Sorry for my terrible english...


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019