diff mbox series

[isar-cip-core,v2] swupdate-certificates: Fix shell error

Message ID 20231211203432.846459-1-Quirin.Gylstorff@siemens.com (mailing list archive)
State Accepted
Headers show
Series [isar-cip-core,v2] swupdate-certificates: Fix shell error | expand

Commit Message

Gylstorff Quirin Dec. 11, 2023, 8:34 p.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>


An Additional bracket was added to all if cases, which leads to build
errors if the variable SWU_SIGN_CERT,SWU_SIGN_SCRIPT and/or SWU_SIGN_KEY
are not set.

Introduced with daa9e6738d1763a953fadc4de6010fe8dfddf27a for SWU_SIGN_CERT and SW_SIGN_KEY. 3a4b25d introduces it for SWU_SIGN_SCRIPT.


Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .../swupdate-certificates/swupdate-certificates-key.inc       | 4 ++--
 .../swupdate-certificates/swupdate-certificates.inc           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Jan Kiszka Dec. 14, 2023, 8:10 a.m. UTC | #1
On 11.12.23 21:34, Quirin Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> 
> An Additional bracket was added to all if cases, which leads to build
> errors if the variable SWU_SIGN_CERT,SWU_SIGN_SCRIPT and/or SWU_SIGN_KEY
> are not set.
> 
> Introduced with daa9e6738d1763a953fadc4de6010fe8dfddf27a for SWU_SIGN_CERT and SW_SIGN_KEY. 3a4b25d introduces it for SWU_SIGN_SCRIPT.
> 
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>  .../swupdate-certificates/swupdate-certificates-key.inc       | 4 ++--
>  .../swupdate-certificates/swupdate-certificates.inc           | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc
> index 0b3e045..d3d2e16 100644
> --- a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc
> +++ b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc
> @@ -21,11 +21,11 @@ SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_SCRIPT') if d.getVar('SWU_SI
>  do_install[cleandirs] = "${D}/usr/share/swupdate-signing/ \
>                           ${D}/usr/bin/"
>  do_install() {
> -    if [ ! -f ${WORKDIR}/${SWU_SIGN_SCRIPT} ] ]; then
> +    if [ ! -f ${WORKDIR}/${SWU_SIGN_SCRIPT} ]; then
>          bbfatal "You must add a '${SWU_SIGN_SCRIPT}' to execute the signing process"
>      fi
>      install -m 0700 ${WORKDIR}/${SWU_SIGN_SCRIPT} ${D}/usr/bin/sign-swu
> -    if [ -z ${SWU_SIGN_KEY} ] ]; then
> +    if [ -z ${SWU_SIGN_KEY} ]; then
>          bbfatal "You must set SWU_SIGN_KEY and provide the required file as artifacts to this recipe"
>      fi
>      TARGET=${D}/usr/share/swupdate-signing/
> diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc
> index 0553c25..6673383 100644
> --- a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc
> +++ b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc
> @@ -18,7 +18,7 @@ SWU_SIGN_CERT ??= ""
>  SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_CERT') if d.getVar('SWU_SIGN_CERT') else '' }"
>  
>  do_install() {
> -    if [ -z ${SWU_SIGN_CERT} ] ]; then
> +    if [ -z ${SWU_SIGN_CERT} ]; then
>          bbfatal "You must set SWU_SIGN_CERT and provide the required file as artifacts to this recipe"
>      fi
>      TARGET=${D}/usr/share/swupdate-signing/

Thanks, applied.

Jan
diff mbox series

Patch

diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc
index 0b3e045..d3d2e16 100644
--- a/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc
+++ b/recipes-devtools/swupdate-certificates/swupdate-certificates-key.inc
@@ -21,11 +21,11 @@  SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_SCRIPT') if d.getVar('SWU_SI
 do_install[cleandirs] = "${D}/usr/share/swupdate-signing/ \
                          ${D}/usr/bin/"
 do_install() {
-    if [ ! -f ${WORKDIR}/${SWU_SIGN_SCRIPT} ] ]; then
+    if [ ! -f ${WORKDIR}/${SWU_SIGN_SCRIPT} ]; then
         bbfatal "You must add a '${SWU_SIGN_SCRIPT}' to execute the signing process"
     fi
     install -m 0700 ${WORKDIR}/${SWU_SIGN_SCRIPT} ${D}/usr/bin/sign-swu
-    if [ -z ${SWU_SIGN_KEY} ] ]; then
+    if [ -z ${SWU_SIGN_KEY} ]; then
         bbfatal "You must set SWU_SIGN_KEY and provide the required file as artifacts to this recipe"
     fi
     TARGET=${D}/usr/share/swupdate-signing/
diff --git a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc
index 0553c25..6673383 100644
--- a/recipes-devtools/swupdate-certificates/swupdate-certificates.inc
+++ b/recipes-devtools/swupdate-certificates/swupdate-certificates.inc
@@ -18,7 +18,7 @@  SWU_SIGN_CERT ??= ""
 SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_CERT') if d.getVar('SWU_SIGN_CERT') else '' }"
 
 do_install() {
-    if [ -z ${SWU_SIGN_CERT} ] ]; then
+    if [ -z ${SWU_SIGN_CERT} ]; then
         bbfatal "You must set SWU_SIGN_CERT and provide the required file as artifacts to this recipe"
     fi
     TARGET=${D}/usr/share/swupdate-signing/