public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin-apps@cygwin.com
Subject: Perpetual postinstall scripts
Date: Wed, 19 Jul 2017 17:11:00 -0000	[thread overview]
Message-ID: <87r2xc73of.fsf@Rainer.invalid> (raw)


We're starting to get more and more of these, which is fine, since that
was why they were introduced.  However, I'd like to remind everybody to
not use bash for any postinstall scripts unless you absolutely have to
and especially not for perpetual postinstall scripts.  It is only
slightly less troublesome to script for dash if your script doesn't use
any bashisms, either set PATH=/usr/bin at the beginning of the script or
use absolute path names for all executables.

Since a lot of the perpetual postinstall scripts check a condition to
decide if they should do anything, I'd also repeat my recommendation to
avoid forking subprocesses as much as possible (use builtins instead of
/usr/bin/test for instance) and hand off to terminal executables via
exec.  This drastically increases the chances of things still working OK
if something went wrong with rebasing.


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

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

             reply	other threads:[~2017-07-19 17:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 17:11 Achim Gratz [this message]
2017-07-27  5:42 ` [Nitpicks] Non-standard Cygwin-only hashbangs in base-files, biber, hg, xlsx2csv, xmlto scripts Brian Inglis

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=87r2xc73of.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=cygwin-apps@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).