Skip to contentSkip to conversation

copy-firmware: Fix test: unexpected operator

PATCH In review Benjamin Drung 2 participants 2 messages Jul 18, 2023 – Jul 25, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 copy-firmware: Fix test: unexpected operator

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.

Signature · 2 lines
Benjamin Drung
Debian & Ubuntu Developer

From 1c6d7661bda5947b01f8f502bc48e363aac17a68 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Tue, 18 Jul 2023 13:20:24 +0200
Subject: [PATCH] copy-firmware: Fix test: unexpected operator

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.

---
 copy-firmware.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
copy-firmware.sh +2 -2
index 58eb7e39..a6be8c74 100755
@@ -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
Signature · 1 line
2.39.2
#1 lore raw

Applied and pushed out.

josh

Quoted 13 lines · Benjamin Drung

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.

--
Benjamin Drung
Debian & Ubuntu Developer