contrib: Check and if needed set user.name and user.email in gcc-git-customization.sh
Richard Earnshaw (lists)
Richard.Earnshaw@arm.com
Fri Jan 17 12:38:00 GMT 2020
On 16/01/2020 14:49, Andreas Schwab wrote:
> On Jan 16 2020, Richard Earnshaw (lists) wrote:
>
>> diff --git a/contrib/gcc-git-customization.sh b/contrib/gcc-git-customization.sh
>> index dae2c35bb57..1cde6fd8224 100755
>> --- a/contrib/gcc-git-customization.sh
>> +++ b/contrib/gcc-git-customization.sh
>> @@ -11,9 +11,9 @@ ask () {
>> read answer
>> if [ "x$answer" = "x" ]
>> then
>> - eval $var=$default
>> + eval $var=\"$default\"
>> else
>> - eval $var=$answer
>> + eval $var=\"$answer\"
>
> This still isn't the safe way to do indirect assignment. The expansion
> of the rhs needs to be delayed, so that the result isn't subject to
> further expansions.
>
> Andreas.
>
> Subject: [PATCH] gcc-git-customization.sh: avoid double expansion
>
> ---
> contrib/gcc-git-customization.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/gcc-git-customization.sh b/contrib/gcc-git-customization.sh
> index b7e4ce308062..26f4389bcc8a 100755
> --- a/contrib/gcc-git-customization.sh
> +++ b/contrib/gcc-git-customization.sh
> @@ -11,9 +11,9 @@ ask () {
> read answer
> if [ "x$answer" = "x" ]
> then
> - eval $var=\"$default\"
> + eval $var=\$default
> else
> - eval $var=\"$answer\"
> + eval $var=\$answer
> fi
> }
>
>
OK.
More information about the Gcc-patches
mailing list