summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2018-02-27 18:04:08 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2018-02-27 18:04:08 +0100
commitf4a3c1b8c5d1a3ac1fdb4f8d71403d90dd6a7e24 (patch)
tree05650f77fb23fdc1a347dc1f1ccc5f1bb66cdde2
parent5c5a6eedc063f31081cd875a0227134fdd5d793b (diff)
Eliminate symbolic link to sdk
-rwxr-xr-xbuild.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/build.sh b/build.sh
index 3ecaab0..0d1b270 100755
--- a/build.sh
+++ b/build.sh
@@ -8,8 +8,6 @@ ver=17.01.4
dist=lede
-sdk_name=sdk-${ver}-${arch}-${subarch}
-sdk=build_dir/${sdk_name}
procd_url=https://github.com/openwrt/openwrt/branches/lede-17.01/package/system/procd
procd_extra_ver=lxd-3
@@ -41,13 +39,13 @@ download_sdk() {
download $sdk_url $sdk_tar
check $sdk_tar $sdk_url
+
+ # global $sdk
+ sdk="build_dir/$(tar tpf $sdk_tar|head -1)"
+
if ! test -e $sdk; then
test -e build_dir || mkdir build_dir
- 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)
+ tar xvpf $sdk_tar -C build_dir
fi
}