# HG changeset patch # User "Yann E. MORIN" # Date 1245700274 -7200 # Node ID f1ce1411d67104c6e08adaefb36329ed7ed4384f # Parent 9bb95fa735acf213475eafc9b1519f7f1363b0ec 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. diff -r 9bb95fa735ac -r f1ce1411d671 scripts/crosstool-NG.sh.in --- a/scripts/crosstool-NG.sh.in Mon Jun 22 21:51:13 2009 +0200 +++ b/scripts/crosstool-NG.sh.in Mon Jun 22 21:51:14 2009 +0200 @@ -147,9 +147,20 @@ 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