summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-06-22 19:51:14 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-06-22 19:51:14 (GMT)
commitf8828f22c3f5cbcc574bdbabb1df55c2db9b286b (patch)
tree989bc1513871d1e5f0c7dcc8479888cd6efc07eb /scripts
parent4cd607512bc7fbd61c94f7f15c7affe986a1cbe8 (diff)
Better check for spaces in paths
Spaces are evil in paths. Print the path that contains a sapce. Don't print computed paths, as they'rebased on provided paths, and don't get space added into them.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/crosstool-NG.sh.in17
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 44c3023..4d2335d 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -147,9 +147,20 @@ if [ ! -d "${CT_LOCAL_TARBALLS_DIR}" ]; then
fi
# Some more sanity checks now that we have all paths set up
-case "${CT_LOCAL_TARBALLS_DIR},${CT_TARBALLS_DIR},${CT_SRC_DIR},${CT_BUILD_DIR},${CT_PREFIX_DIR},${CT_INSTALL_DIR}" in
- *" "*) CT_Abort "Don't use spaces in paths, it breaks things.";;
-esac
+for d in \
+ LOCAL_TARBALLS \
+ WORK \
+ PREFIX \
+ INSTALL \
+ ; do
+ eval dir="\${CT_${d}_DIR}"
+ case "${dir}" in
+ *" "*)
+ CT_DoLog ERROR "'CT_${d}_DIR'='${dir}' contains a space in it."
+ CT_Abort "Don't use spaces in paths, it breaks things."
+ ;;
+ esac
+done
# Check now if we can write to the destination directory:
if [ -d "${CT_INSTALL_DIR}" ]; then