#!/bin/bash

install_version=${1:-"r20b"}
package_name="android-ndk-${install_version}"

# Download
cd /tmp
rm -f ${package_name}-linux-x86_64.zip
wget https://tools.mindspore.cn/tools/build/android-ndk/${package_name}/${package_name}-linux-x86_64.zip
rm -rf ${package_name}
unzip ${package_name}-linux-x86_64.zip
rm -rf /usr/local/${package_name}
mv ${package_name} /usr/local/

# Delete package
rm -f /tmp/${package_name}-linux-x86_64.zip
