#!/bin/bash

if [ -z "${1}" ] || [ -z "${2}" ]; then
    echo "${0} <version> <date>" && exit 1
fi

dbid="lx4508132"
version="${1}"
date="${2}"

archs=("arm32" "arm64" "x86-64" "x86_small-64")

for arch in ${archs[@]}
do
    URL="https://cdn-oss.corp.kuaishou.com/provider/${dbid}/public/version/${version}/nexusplugin-${arch}-${version}-${date}.tgz"

    echo "URL: ${URL}, Downloading..."

    curl --interface eth0 -O ${URL}
done

echo "Download done."
exit 0
