public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin@cygwin.com
Subject: Re: How to install a custom permanent postinstall handler?
Date: Sun, 03 Apr 2016 12:02:00 -0000	[thread overview]
Message-ID: <87a8la6gtb.fsf@Rainer.invalid> (raw)
In-Reply-To: <570102D3.6000502@arcor.de> (Dirk Fassbender's message of "Sun, 3	Apr 2016 13:47:31 +0200")

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

  reply	other threads:[~2016-04-03 12:02 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 [this message]
2016-04-03 18:06       ` Yaakov Selkowitz
2016-04-03 23:20         ` Andrey Repin
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=87a8la6gtb.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=cygwin@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).