Fix string comparison122/head
commit278b05d9cb4e3aba603c49a5bbc093e6c4105ceb
authorPiotr Kasprzyk <ciri@ciri.pl>
Tue, 2 Apr 2019 07:37:37 +0000 (2 09:37 +0200)
committerPiotr Kasprzyk <ciri@ciri.pl>
Tue, 2 Apr 2019 07:37:37 +0000 (2 09:37 +0200)
treecd38f42933f7490d2c9568cc1cfadf137fda2b3c
parent7821ed5ab2e5d375a943853baba660bc66fdc7d2
Fix string comparison

There is an error when == operator is used with single square brackets:

+ [ ../WRF == none ]
./configure: 183: [: ../WRF: unexpected operator

According to:
https://unix.stackexchange.com/questions/382003/what-are-the-differences-between-and-in-conditional-expressions

The = operator is the POSIX compatible way of comparing strings in sh/test.

I think there are 2 ways of comparing strings:
if [ $wrf_dir = "none" ]; then
if [[ $wrf_dir == "none" ]]; then
configure