X-Recipient: archive-cygwin@delorie.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:from:to:subject:references:date:in-reply-to
	:message-id:mime-version:content-type; q=dns; s=default; b=W3Iqf
	9h/CjCwbpI3tu74WNIoom73nCv2Qu0tLw1eKF3V0wLqOpYU6XaLoVBKVuwLnfsaK
	0JAydAJSbZiDOK76O7RE6gRPqtHzP+hbWqrvL7o5ZA8geJgeT/3eQCsCWW31Ir6i
	0TFiGiIvbDz/WK+f/tcNfIrVbnC5Z9HJBenSrM=
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:from:to:subject:references:date:in-reply-to
	:message-id:mime-version:content-type; s=default; bh=uK648UPPyA5
	2UbmUiBA2JtGY0/c=; b=clN4a+xKweXI+B8llRqbHZqUlkXbtvFwR4QwBie3SQi
	TFpBO7EC76WmD9gIJLClQIUElvRyMAokZK6Q8mY1gRxBCP6xr/TWQLZkiYUtqYfQ
	kI2YMVl7xr7bZ336Wr5nVbXnRFz34aHiEfrw7hCSKKpTqY9jmKBdekNGJc7hYWIc
	=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:570102D, H*i:sk:570102D, among
X-HELO: mail-in-16.arcor-online.net
X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-06.arcor-online.net 3qdDJc4fMSz7m3S
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin@cygwin.com
Subject: Re: How to install a custom permanent postinstall handler?
References: <838469265.20160401235308@yandex.ru>	<87a8lcicxg.fsf@Rainer.invalid> <5700975A.3070002@cygwin.com>	<87y48vqkfx.fsf@Rainer.invalid> <570102D3.6000502@arcor.de>
Date: Sun, 03 Apr 2016 14:02:40 +0200
In-Reply-To: <570102D3.6000502@arcor.de> (Dirk Fassbender's message of "Sun, 3	Apr 2016 13:47:31 +0200")
Message-ID: <87a8la6gtb.fsf@Rainer.invalid>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain

Dirk Fassbender writes:
> So it is not easy to write portable scripts for the standard shell
> /bin/sh between different systems and the exchange of the standard
> shell needs a check for all scripts, that uses a shebang line /bin/sh
> or are use during system initialisation.

Whatever is under /bin/sh is supposed to be POSIX compliant.  If you
make use of your knowledge of what shell this actually is (dash, posh,
bash, busybox, etc.), then you're by definition not interested in having
a portable script and could just as easily use a different shebang line.

> I personally prefer to use a shebang line set to the shell type used
> (ksh, bash, dash). This is more portable for different system types.

You're specifying a shell type and only have to deal with portability
among the versions of that shell.  But you're explicitly saying your
script (possibly) isn't POSIX compatible.

> For putting the /bin/sh under alternatives control on cygwin there
> must be some preparations.
> There are several postinstall and preremove scripts without a shebang
> line or with  a shebang line /bin/sh or /usr/bin/sh. Are all of these
> scripts written to run correctly with a bash and dash invoked ?

The shebang line isn't even looked at for the postinstall scripts.  The
suffix is what determines which shell gets to run the scripts.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

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

