From f4a3c1b8c5d1a3ac1fdb4f8d71403d90dd6a7e24 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 27 Feb 2018 18:04:08 +0100 Subject: Eliminate symbolic link to sdk --- build.sh | 12 +++++------- 1 file 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 } -- cgit v1.2.3