diff mbox series

[oe-layersetup,13/15] oe-layertool-setup: add a path sanity check for oebase

Message ID 20230607200504.3810426-14-rs@ti.com
State Superseded
Delegated to: Ryan Eatmon
Headers show
Series Sacrifice your first born to the linter | expand

Commit Message

Randolph Sapp June 7, 2023, 8:05 p.m. UTC
From: StaticRocket <35777938+StaticRocket@users.noreply.github.com>

OEBase can not have a space in it's name due to parsing limitations of
POSIX shell. Make sure to check this before doing anything.

Signed-off-by: StaticRocket <35777938+StaticRocket@users.noreply.github.com>
---
 oe-layertool-setup.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh
index 0928959..8694abd 100755
--- a/oe-layertool-setup.sh
+++ b/oe-layertool-setup.sh
@@ -966,6 +966,14 @@  do
     esac
 done
 
+# add early sanity check
+if printf '%s\n' "$oebase" | grep -q '\s'
+then
+   printf '%s\n' "OE-Base path has whitespace characters in it's path!" \
+                 "This is currently unsupported." ;
+   exit 1
+fi
+
 # create passed in directory if it doesn't exist
 mkdir -p "$oebase"