mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-21 12:56:13 +03:00
src/get-openwrt.sh
This commit is contained in:
parent
fbe8fc219f
commit
35c964473c
@ -15,17 +15,33 @@ arm_*) abi=musl_eabi;;
|
||||
*) abi=musl;;
|
||||
esac
|
||||
|
||||
if [ "$subtarget" ]; then
|
||||
SDK_PATH=openwrt-toolchain-$release-$target-${subtarget}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||
major=${release%%.*}
|
||||
if [ "$major" -ge 22 ]; then
|
||||
path_suffix=toolchain
|
||||
else
|
||||
subtarget='generic'
|
||||
SDK_PATH=openwrt-toolchain-$release-${target}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||
path_suffix=sdk
|
||||
fi
|
||||
|
||||
if [ ! "$subtarget" ]; then
|
||||
subtarget=generic
|
||||
fi
|
||||
|
||||
if [ "$subtarget" != generic -o "$major" -ge 22 ]; then
|
||||
SDK_PATH=openwrt-$path_suffix-$release-$target-${subtarget}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||
else
|
||||
SDK_PATH=openwrt-$path_suffix-$release-${target}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||
fi
|
||||
SDK_URL=https://downloads.openwrt.org/releases/$release/targets/$target/$subtarget/$SDK_PATH.tar.xz
|
||||
rm -rf $SDK_PATH
|
||||
curl $SDK_URL | tar xJf -
|
||||
cd $SDK_PATH
|
||||
|
||||
full_root=toolchain-*_gcc-${gcc_ver}_${abi}
|
||||
|
||||
if [ "$major" -lt 22 ]; then
|
||||
mv $SDK_PATH/staging_dir/$full_root $SDK_PATH
|
||||
fi
|
||||
|
||||
cd $SDK_PATH
|
||||
cat >include.txt <<EOF
|
||||
./include
|
||||
./lib/*.o
|
||||
|
Loading…
Reference in New Issue
Block a user