public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: Yaakov Selkowitz <yselkowitz@cygwin.com>, cygwin@cygwin.com
Subject: Re: How to install a custom permanent postinstall handler?
Date: Sun, 03 Apr 2016 23:20:00 -0000	[thread overview]
Message-ID: <1564992119.20160404020533@yandex.ru> (raw)
In-Reply-To: <57015B97.3010401@cygwin.com>

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

  reply	other threads:[~2016-04-03 23:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 21:05 Andrey Repin
2016-04-02  9:21 ` Achim Gratz
2016-04-02 14:18   ` Eric Blake
2016-04-02 14:56     ` Achim Gratz
2016-04-03  4:09   ` Yaakov Selkowitz
2016-04-03  6:24     ` Achim Gratz
2016-04-03 11:47       ` Dirk Fassbender
2016-04-03 12:02         ` Achim Gratz
2016-04-03 18:06       ` Yaakov Selkowitz
2016-04-03 23:20         ` Andrey Repin [this message]
2016-04-04  6:09           ` Yaakov Selkowitz
2016-04-04 11:20             ` Andrey Repin
2016-04-04 14:42             ` Eric Blake
2016-04-04 15:37               ` Helmut Karlowski
2016-04-04 15:53           ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1564992119.20160404020533@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=cygwin@cygwin.com \
    --cc=yselkowitz@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).