diff mbox series

[5/5] configure: Avoid '==' bashism

Message ID 20220720152631.450903-6-peter.maydell@linaro.org
State Superseded
Headers show
Series configure: fix some non-portabilities | expand

Commit Message

Peter Maydell July 20, 2022, 3:26 p.m. UTC
The '==' operator to test is a bashism; the standard way to copmare
strings is '='. This causes dash to complain:

../../configure: 681: test: linux: unexpected operator

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth July 20, 2022, 3:39 p.m. UTC | #1
On 20/07/2022 17.26, Peter Maydell wrote:
> The '==' operator to test is a bashism; the standard way to copmare
> strings is '='. This causes dash to complain:
> 
> ../../configure: 681: test: linux: unexpected operator
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index d0e9a51462e..2c19329d58c 100755
> --- a/configure
> +++ b/configure
> @@ -678,7 +678,7 @@ werror=""
>   
>   meson_option_build_array() {
>     printf '['
> -  (if test "$targetos" == windows; then
> +  (if test "$targetos" = windows; then
>       IFS=\;
>     else
>       IFS=:

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/configure b/configure
index d0e9a51462e..2c19329d58c 100755
--- a/configure
+++ b/configure
@@ -678,7 +678,7 @@  werror=""
 
 meson_option_build_array() {
   printf '['
-  (if test "$targetos" == windows; then
+  (if test "$targetos" = windows; then
     IFS=\;
   else
     IFS=: