RFR [8025886] typo in shell regtest == instead of =
Dmitry Samersoff
dmitry.samersoff at oracle.com
Sat Oct 5 10:30:28 PDT 2013
Ivan,
Looks good for me.
-Dmitry
On 2013-10-05 17:04, Ivan Gerasimov wrote:
> Dmitry, thanks for suggestion!
>
> Yes, == comparison isn't the only sh-incompatible thing in the script.
> Sh may be unhappy with [[ as well.
> So I replaced it with case as you suggested.
> Grep shows that it was the only place where [[ and == were used in
> regtests, so it would be good to make things consistent.
>
> Please find a new patch below.
>
> Sincerely yours,
> Ivan
>
> --- a/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
> +++ b/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
> @@ -34,12 +34,13 @@
> OS=`uname -s`
> UMASK=`umask`
>
> -if [[ $OS == CYGWIN_NT* ]] ; then
> +case $OS in
> +CYGWIN_NT*)
> OS="Windows_NT"
> if [ -z "$SystemRoot" ] ; then
> - SystemRoot=$SYSTEMROOT
> + SystemRoot=$SYSTEMROOT
> fi
> -fi
> +esac
>
> case $OS in
> SunOS | Linux | Darwin)
>
>
>
> On 04.10.2013 15:34, Dmitry Samersoff wrote:
>> Ivan,
>>
>> If you need shell pattern match CYGWIN_NT*
>> it's better to use
>>
>> case
>>
>> but not
>>
>> if
>>
>> -Dmitry
>>
>>
>
--
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the serviceability-dev
mailing list