From 877b8687664c1f8643072db38ad47ea4fb9fbb86 Mon Sep 17 00:00:00 2001 From: Robert Farmer Date: Thu, 19 Nov 2020 16:27:48 +0100 Subject: [PATCH] Add checks on linux for folders with spaces in the name --- profile/mesasdk-aarch64-linux/init_scripts/init.sh | 6 ++++++ profile/mesasdk-x86_64-linux-dev/init_scripts/init.sh | 6 ++++++ profile/mesasdk-x86_64-linux/init_scripts/init.sh | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/profile/mesasdk-aarch64-linux/init_scripts/init.sh b/profile/mesasdk-aarch64-linux/init_scripts/init.sh index 49bbe22..b32f489 100644 --- a/profile/mesasdk-aarch64-linux/init_scripts/init.sh +++ b/profile/mesasdk-aarch64-linux/init_scripts/init.sh @@ -7,6 +7,12 @@ if [[ -z "$MESASDK_ROOT" ]]; then return 1 fi +if [[ "$MESASDK_ROOT" == *" "* ]]; then + echo "mesasdk_init.sh: MESASDK_ROOT can not contain spaces" + echo "mesasdk_init.sh: Please move your sdk to a folder without spaces in the full path name" + return 1 +fi + # Check architecture if [ ! -f "${MESASDK_ROOT}/etc/check_arch.done" ]; then diff --git a/profile/mesasdk-x86_64-linux-dev/init_scripts/init.sh b/profile/mesasdk-x86_64-linux-dev/init_scripts/init.sh index 49bbe22..b32f489 100644 --- a/profile/mesasdk-x86_64-linux-dev/init_scripts/init.sh +++ b/profile/mesasdk-x86_64-linux-dev/init_scripts/init.sh @@ -7,6 +7,12 @@ if [[ -z "$MESASDK_ROOT" ]]; then return 1 fi +if [[ "$MESASDK_ROOT" == *" "* ]]; then + echo "mesasdk_init.sh: MESASDK_ROOT can not contain spaces" + echo "mesasdk_init.sh: Please move your sdk to a folder without spaces in the full path name" + return 1 +fi + # Check architecture if [ ! -f "${MESASDK_ROOT}/etc/check_arch.done" ]; then diff --git a/profile/mesasdk-x86_64-linux/init_scripts/init.sh b/profile/mesasdk-x86_64-linux/init_scripts/init.sh index 49bbe22..b32f489 100644 --- a/profile/mesasdk-x86_64-linux/init_scripts/init.sh +++ b/profile/mesasdk-x86_64-linux/init_scripts/init.sh @@ -7,6 +7,12 @@ if [[ -z "$MESASDK_ROOT" ]]; then return 1 fi +if [[ "$MESASDK_ROOT" == *" "* ]]; then + echo "mesasdk_init.sh: MESASDK_ROOT can not contain spaces" + echo "mesasdk_init.sh: Please move your sdk to a folder without spaces in the full path name" + return 1 +fi + # Check architecture if [ ! -f "${MESASDK_ROOT}/etc/check_arch.done" ]; then