Skip to contentSkip to conversation

ti-tisdk-setup: only install create-ubifs if args are provided

PATCH New Jacob Stiffler 1 participant 1 message Dec 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ti-tisdk-setup: only install create-ubifs if args are provided

---
 .../recipes-tisdk/ti-tisdk-setup/ti-tisdk-setup.bb         | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
meta-arago-distro/recipes-tisdk/ti-tisdk-setup/ti-tisdk-setup.bb +10 -4
index 5ef9ef8..886a8b5 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Package containing scripts to setup the development host and targ
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://setup.sh;beginline=3;endline=31;md5=fc4b04a33df6d892c9f4d4a9d92b945e"
 
-PR = "r45"
+PR = "r46"
 
 BRANCH ?= "master"
 SRCREV = "42a8379fda829f34c374ddfca0242a479a84d454"
@@ -51,9 +51,15 @@ do_install () {
 
     install -m 0755 ${S}/${UBOOT_ENV} ${D}/bin/setup-uboot-env.sh
 
-    sed -i -e "s|__MKUBIFS_ARGS__|${MKUBIFS_ARGS}|" \
-           -e "s|__UBINIZE_ARGS__|${UBINIZE_ARGS}|" \
-              "${D}/bin/create-ubifs.sh"
+    if [ -z "${MKUBIFS_ARGS}" -o -z "${UBINIZE_ARGS}" ]
+    then
+        # UBIFS not supported
+        rm "${D}/bin/create-ubifs.sh"
+    else
+        sed -i -e "s|__MKUBIFS_ARGS__|${MKUBIFS_ARGS}|" \
+               -e "s|__UBINIZE_ARGS__|${UBINIZE_ARGS}|" \
+                  "${D}/bin/create-ubifs.sh"
+    fi
 }
 
 FILES_${PN} += "setup.sh"
Signature · 1 line
2.7.4