This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH] setup: define CYGWINFORALL for postinstall/preremove scripts
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Tue, 24 Aug 2010 17:27:06 -0400
- Subject: Re: [PATCH] setup: define CYGWINFORALL for postinstall/preremove scripts
- References: <AANLkTimCGXZZAd0f=YWU5cBP807aVZT66Vz2KP2pZmWG@mail.gmail.com>
- Reply-to: cygwin-apps at cygwin dot com
On Tue, Aug 24, 2010 at 09:25:29PM +0100, Andy Koppe wrote:
>Following a suggestion by Corinna, the attached patch defines a
>variable called CYGWINFORALL in the environment of postinstall and
>preremove scripts. It's set to "-A" when installing for all users, and
>to an empty string when installing for "Just me". This allows it to be
>used both directly as an argument to cygpath or mkshortcut, and in
>conditionals using 'test -z' or 'test -n'.
>
>I've checked that it does indeed get defined appropriately for both
>install types and both postinstall and preremove script.
>
>Changelog:
> * script.cc (init_run_script): Define CYGWINFORALL variable
> signifying install for all users or just the current user.
Shouldn't the environment variable be unset entirely when not installing
for everyone? I.e., the second argument to SetEnvironmentVariable should
be NULL rather than "".
cgf