blob: 70add62de75ac8d8480e1261128e32addd531575 [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001From 11610debf750f15c7a104db7315dcd7d69e282a8 Mon Sep 17 00:00:00 2001
2From: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
3Date: Sat, 26 Feb 2022 01:52:26 +0000
4Subject: [PATCH] Makefile: Fix non-portable sh check for plugins
5
6Upstream-Status: Pending
7
8We previously held a patch that used "=" for comparison, but when
9that patch got upstreamed it was changed to "==" which is non-portable,
10resulting in an error:
11
12/bin/sh: 6: [: acipher: unexpected operator
13/bin/sh: 6: [: plugins: unexpected operator
14/bin/sh: 6: [: hello_world: unexpected operator
15/bin/sh: 6: [: hotp: unexpected operator
16/bin/sh: 6: [: aes: unexpected operator
17/bin/sh: 6: [: random: unexpected operator
18/bin/sh: 6: [: secure_storage: unexpected operator
19
20if /bin/sh doesnt point to bash.
21
22Which in turn causes our do_install task to fail since plugins arent
23where we expect them to be.
24
25
26Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
27---
28 Makefile | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31diff --git a/Makefile b/Makefile
32index b3f16aa..9359d95 100644
33--- a/Makefile
34+++ b/Makefile
35@@ -31,7 +31,7 @@ prepare-for-rootfs: examples
36 cp -p $$example/host/optee_example_$$example $(OUTPUT_DIR)/ca/; \
37 fi; \
38 cp -pr $$example/ta/*.ta $(OUTPUT_DIR)/ta/; \
39- if [ $$example == plugins ]; then \
40+ if [ $$example = plugins ]; then \
41 cp -p plugins/syslog/*.plugin $(OUTPUT_DIR)/plugins/; \
42 fi; \
43 done
44--
452.25.1
46