RFR [8025886] typo in shell regtest == instead of =
Ivan Gerasimov
ivan.gerasimov at oracle.com
Sat Oct 5 06:04:13 PDT 2013
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
>
>
More information about the serviceability-dev
mailing list