]> git.apps.os.sepia.ceph.com Git - linux-firmware.git/commitdiff
copy-firmware: Fix test: unexpected operator
authorBenjamin Drung <benjamin.drung@canonical.com>
Tue, 18 Jul 2023 11:20:24 +0000 (13:20 +0200)
committerJosh Boyer <jwboyer@kernel.org>
Tue, 25 Jul 2023 10:53:21 +0000 (06:53 -0400)
dash is the default /bin/sh on Debian based system.

```
dash ./copy-firmware.sh --zstd example
./copy-firmware.sh: 37: test: unexpected operator
```

`=` should be used with the test command for POSIX conformance.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
copy-firmware.sh

index 58eb7e39ffb76ce851b4b14e6e661912d64ad6ab..a6be8c74bf62af312024567515470efb45146bb0 100755 (executable)
@@ -24,7 +24,7 @@ while test $# -gt 0; do
             ;;
 
         --xz)
-            if test "$compext" == ".zst"; then
+            if test "$compext" = ".zst"; then
                 echo "ERROR: cannot mix XZ and ZSTD compression"
                 exit 1
             fi
@@ -34,7 +34,7 @@ while test $# -gt 0; do
             ;;
 
         --zstd)
-            if test "$compext" == ".xz"; then
+            if test "$compext" = ".xz"; then
                 echo "ERROR: cannot mix XZ and ZSTD compression"
                 exit 1
             fi