summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2018-02-27 15:44:50 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2018-02-27 15:44:50 +0100
commitc2cb6eb870497ee0f3b3a6af416102dae0ceadef (patch)
treef9badead4188aa5eb74d4a46619a8b63bcab057c
parentb2a5a0899c19d46b41a8c6c5a9491e3989da16d3 (diff)
Fix link to snapshot sdk
-rwxr-xr-xbuild.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 00455c9..66b0406 100755
--- a/build.sh
+++ b/build.sh
@@ -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
}