diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-02-27 15:44:50 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-02-27 15:44:50 +0100 |
commit | c2cb6eb870497ee0f3b3a6af416102dae0ceadef (patch) | |
tree | f9badead4188aa5eb74d4a46619a8b63bcab057c | |
parent | b2a5a0899c19d46b41a8c6c5a9491e3989da16d3 (diff) |
Fix link to snapshot sdk
-rwxr-xr-x | build.sh | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -45,8 +45,11 @@ download_sdk() { check $sdk_tar $sdk_url if ! test -e $sdk; then test -e build_dir || mkdir build_dir - tar xvpf $sdk_tar -C build_dir - (cd build_dir && ln -sfT ${dist}-sdk-${ver}-${arch}-${subarch}* $sdk_name) + local sdk_dir=$(tar tpf $sdk_tar|head -1) + if ! test -e build_dir/$sdk_dir; then + tar xvpf $sdk_tar -C build_dir + fi + (cd build_dir && ln -sfT $sdk_dir $sdk_name) fi } |