lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master 523d869 14/14: Define a variable just bef


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] 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

Attachment: pgpsgtJYcvArH.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]