aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2011-05-25 11:44:39 +0300
committerJim Huang <jim.huang@linaro.org>2011-05-26 22:09:21 +0800
commit03a29a045e70cdb7ea575690616f9bb1e6bbd186 (patch)
treeea85b27afff3005c3c794328e53f8c76198cdda5
parent431c5386d78f71ed81210987717dd984f06d4a3d (diff)
Make sure that package dir exists (befor trying to d/l into it).
Also, explicitly treat it as directory, to avoid confusion with the file of same name. Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org> Signed-off-by: Jim Huang <jim.huang@linaro.org>
-rwxr-xr-xlinaro-build.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/linaro-build.sh b/linaro-build.sh
index 57ad83d..c0982a8 100755
--- a/linaro-build.sh
+++ b/linaro-build.sh
@@ -97,7 +97,7 @@ downloadFromHTTP() {
info "${file} is already exist, skip download"
else
wget "$url" || error "wget $1 error"
- mv "$file" "${ARG_TOOLCHAIN_SRC_DIR}/$package" || error "fail to move $file"
+ mv "$file" "${ARG_TOOLCHAIN_SRC_DIR}/$package/" || error "fail to move $file"
#TODO: Add md5 check
fi
@@ -114,6 +114,8 @@ getPackage() {
package=${package%%-*}
local PACKAGE_NAME=`echo $package | tr "[:lower:]" "[:upper:]"`
+ # Make sure that package dir exists
+ mkdir -p ${ARG_TOOLCHAIN_SRC_DIR}/$package || error "Cannot create ${ARG_TOOLCHAIN_SRC_DIR}/$package directory"
case $1 in
lp:*) # bzr clone lp:gcc-linaro