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=JZr20fiASqAeXnlt sksozQLFn+aUyuKkkoS6Wxw8Lc5olEggD6I6RSSUHokqMyTivwf7ahlgdH1rpqoX pUeKsbOKInYZxlgjAjgVTmFLA9UK6/TeGnR8HKSOVlaSaMFOY/PJw6wb/EflcBPh SjPG4eO+fkFKTYEbBAltX6tp1lQ= 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=O3mkERYgN+Ys6ST8mbAwtL 9Eqgc=; b=vBmJ3Up5nbD7mDUjWvU8YFCNYA63pVF+JePpW0wiZxHsVD6WB9U4U8 AGrS0rgvNULRAAhVHUdMHpX8shR9wp3i9azJlrQbVWuvxsfsgJEU/pLikrWCwBGk 0Q9RBEeYVnhDOk0lwwePsbygf+O1Gt23lbu2kgqyhI4/J73t4q4aQ= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=4.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,MIME_BASE64_BLANKS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*UA:Bat!, H*x:Bat!, H*r:4.80.1, H*r:sk:postmas X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp.ht-systems.ru Date: Mon, 4 Apr 2016 02:05:33 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <1564992119.20160404020533@yandex.ru> To: Yaakov Selkowitz , cygwin AT cygwin DOT com Subject: Re: How to install a custom permanent postinstall handler? In-Reply-To: <57015B97.3010401@cygwin.com> References: <838469265 DOT 20160401235308 AT yandex DOT ru> <87a8lcicxg DOT fsf AT Rainer DOT invalid> <5700975A DOT 3070002 AT cygwin DOT com> <87y48vqkfx DOT fsf AT Rainer DOT invalid> <57015B97 DOT 3010401 AT cygwin DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id u33NKMmH025144 Greetings, Yaakov Selkowitz! > On 2016-04-03 01:24, Achim Gratz wrote: >> Yaakov Selkowitz writes: >>> I am not in favour of /bin/sh being alternatives-able. >> >> I'd posit that it should not be bash then and somwone else might >> reasonably want a different /bin/sh, perhaps even bash. Which is >> exactly why the alternatives system exists. > Unfortunately the reality is that not all #!/bin/sh scripts are 100% > POSIX compliant, nor am I convinced that all the possible shells are > interchangeable either. Ultimately this would lead to unpredictable > (and difficult to support) behaviour for scripts. >>> The *proper* course of action is to use the shebang for the script >>> interpreter you require, i.e. /bin/dash. >> >> It's perfectly OK to use /bin/sh (I'd even recommend it) if all you want >> is a POSIX shell. > True, but the OP said "my scripts rely on ASH/DASH functionality that is > not present in BASH". If you use functionality specific to a given > shell, then you have to shebang that shell! I agree, of course, but in this case, I have to ask one not strictly Cygwin-related question: Is 'local -' a POSIX construct and/or is there a way to achieve the same effect without using it? (Localize any shell option changes within a function.) Because, within my reach, Cygwin is the only system that not using DASH as /bin/sh. Though, I may try rolling some busybox… -- With best regards, Andrey Repin Monday, April 4, 2016 01:56:44 Sorry for my terrible english...