aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Huang <jim.huang@linaro.org>2011-04-07 20:23:20 +0800
committerJim Huang <jim.huang@linaro.org>2011-04-07 20:23:20 +0800
commitebc3a9fd2b18ce71a95c83071a1c6f1954fa6320 (patch)
tree4889f7c034cf209b606fcc9ae4588a8416cc0587
parent2ca85ab59f73a91b8e1afbd00d71dd54fa143014 (diff)
Improve the messages when expected package directory is not found
-rwxr-xr-xlinaro-build.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/linaro-build.sh b/linaro-build.sh
index 8c48312..997ab12 100755
--- a/linaro-build.sh
+++ b/linaro-build.sh
@@ -123,7 +123,10 @@ getPackage() {
downloadFromHTTP $package $1
;;
*) # local directory
- [ ! -d "${ARG_TOOLCHAIN_SRC_DIR}/$package/$1" ] && error "$ARG_TOOLCHAIN_SRC_DIR/$package/$1 not exist"
+ [ ! -d "${ARG_TOOLCHAIN_SRC_DIR}/$package/$1" ] && \
+ echo "Directory $ARG_TOOLCHAIN_SRC_DIR/$package/$1 does not exist" && \
+ mkdir -p $ARG_TOOLCHAIN_SRC_DIR/$package && \
+ error "Please extract the $package source into directory $ARG_TOOLCHAIN_SRC_DIR/$package"
eval "ARG_LINARO_${PACKAGE_NAME}_SRC_DIR=$1"
esac