summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorRomain Bazile <romain@bazile.io>2022-02-02 14:10:24 +0100
committerXECDesign <XECDesign@users.noreply.github.com>2022-02-02 14:12:39 +0000
commit8862e4d9ff15b44daa8563872fc928a3317e33dc (patch)
treef6f17fdd0e3a135720469c5007338c00f97a1a5a /build.sh
parentc393ef105eae82448d31194c28f54b71e1f83da7 (diff)
Add check and warning for a space presence in the base path
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 6f6a0d2..f743e2a 100755
--- a/build.sh
+++ b/build.sh
@@ -155,6 +155,14 @@ if [ "$(id -u)" != "0" ]; then
fi
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [[ $BASE_DIR = *" "* ]]; then
+ echo "There is a space in the base path of pi-gen"
+ echo "This is not a valid setup supported by debootstrap."
+ echo "Please remove the spaces, or move pi-gen directory to a base path without spaces" 1>&2
+ exit 1
+fi
+
export BASE_DIR
if [ -f config ]; then