diff options
author | Rob Savoye <rob.savoye@linaro.org> | 2016-03-10 17:16:24 +0700 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2016-04-11 13:37:54 +0000 |
commit | 677c99fa4387ad6c8dc878491916f102ca354558 (patch) | |
tree | 675e3a91937c265910d5d75f24f1acc4bb67a1d7 | |
parent | 00140a97c8d7f30a48116798674762bd5af64b30 (diff) |
Handle file:// as an alternate protocol in addition to http(s):. This is used of the external toolchain tarball is on the same host machine.
Change-Id: I1638c508b59e30b0feded65812470ce36a9ebf91
-rwxr-xr-x | functions.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/functions.sh b/functions.sh index 3fc1050..f4ebcd6 100755 --- a/functions.sh +++ b/functions.sh @@ -229,9 +229,14 @@ conf_toolchain() local_tarball_name=toolchain/$tarball_name fi - if [ ! -e $local_tarball_name ];then - wget -cv $external_url -O $local_tarball_name - fi + protocol="`echo $external_url | cut -d ':' -f 1`" + if test $protocol = "file"; then + local_tarball_name="`echo $external_url | sed -e 's:file./::'`" + else + if [ ! -e $local_tarball_name ];then + wget -cv $external_url -O $local_tarball_name + fi + fi md5sum $local_tarball_name tar xf $local_tarball_name -C toolchain |