[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi-commits] [lmi] master 523d869 14/14: Define a variable just bef
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi-commits] [lmi] master 523d869 14/14: Define a variable just before its first use |
Date: |
Tue, 5 May 2020 15:52:16 +0200 |
On Tue, 5 May 2020 09:03:29 -0400 (EDT) Greg Chicares <address@hidden> wrote:
GC> branch: master
GC> commit 523d869823f209fa39326fbecb27102d8a336d75
GC> Author: Gregory W. Chicares <address@hidden>
GC> Commit: Gregory W. Chicares <address@hidden>
GC>
GC> Define a variable just before its first use
GC> ---
GC> gui_test.ps1 | 4 ++--
GC> 1 file changed, 2 insertions(+), 2 deletions(-)
GC>
GC> diff --git a/gui_test.ps1 b/gui_test.ps1
GC> index e6345fc..620ba89 100644
GC> --- a/gui_test.ps1
GC> +++ b/gui_test.ps1
GC> @@ -32,8 +32,6 @@
GC> # Additional parameters, passed directly to wx_test, can be specified at
the
GC> # end of the previous command line.
GC>
GC> -$prefix = "/opt/lmi"
GC> -
GC> # This script deliberately parallels gui_test.sh as closely as possible, in
GC> # particular the same sed syntax is used for the search expressions to
GC> # facilitate keeping them in sync between the two files, even if this
requires
GC> @@ -157,6 +155,8 @@ $test_ignore_patterns = $gui_test_clutter `
GC> -creplace '/d$' |
GC> Where-Object {$_}
GC>
GC> +$prefix = "/opt/lmi"
GC> +
GC> # Directory for test logs.
GC> $log_dir = "$prefix/gcc/i686-w64-mingw32/logs"
Funnily (for some value of "fun"), this is actually how it had been
written initially, but I moved $prefix upwards later because I actually had
param($prefix = "/opt/lmi")
instead of the line defining it for some time. This does the same thing as
the assignment does, but also allows to specify "-prefix <directory>" on
the command line when running the script to use a non-default value and I
thought that could be useful (at least to me, for testing).
Finally, I decided not to keep this and removed the "param" part, but left
the line at its previous location, which was mandated by the use of "param"
as it must be the first executable line of the script.
And the reason I'm writing all this is just to let you know that we can
easily make it configurable if it could be useful, and I wanted to, but
just hadn't had time to propose, this to you until now.
Regards,
VZ
pgpUUVgANC6CG.pgp
Description: PGP signature
- [lmi-commits] [lmi] master d287cb4 10/14: Don't repeat contents of $prefix literally, (continued)
- [lmi-commits] [lmi] master d287cb4 10/14: Don't repeat contents of $prefix literally, Greg Chicares, 2020/05/05
- [lmi-commits] [lmi] master d34e4b6 11/14: Reuse $srcdir instead of attempting to reconstruct it, Greg Chicares, 2020/05/05
- [lmi-commits] [lmi] master d37be91 13/14: Add documentation from 'gui_test.sh' to 'gui_test.ps1', Greg Chicares, 2020/05/05
- [lmi-commits] [lmi] master bbf79d1 06/14: Install 'sudo' in centos chroot, Greg Chicares, 2020/05/05
- [lmi-commits] [lmi] master e4fe79d 09/14: Don't specify a centos mirror for 'rinse', Greg Chicares, 2020/05/05
- [lmi-commits] [lmi] master b812286 12/14: Add a translation of 'gui_test.sh', Greg Chicares, 2020/05/05
- [lmi-commits] [lmi] master 7f282e0 03/14: Let all "lmi" group members use centos chroots, Greg Chicares, 2020/05/05
- [lmi-commits] [lmi] master a61727e 07/14: Install 'less' and 'vim' for centos, Greg Chicares, 2020/05/05
- [lmi-commits] [lmi] master 26182ed 08/14: Reduce gratuitous differences between scripts, Greg Chicares, 2020/05/05
- [lmi-commits] [lmi] master 523d869 14/14: Define a variable just before its first use, Greg Chicares, 2020/05/05
- Re: [lmi-commits] [lmi] master 523d869 14/14: Define a variable just before its first use,
Vadim Zeitlin <=