From a2417e564351c8d19bfc0a5128980205f32adab5 Mon Sep 17 00:00:00 2001 From: Song Guo Date: Fri, 20 Nov 2020 10:41:56 +0800 Subject: [PATCH] Add the ability to specify openthread version --- dependency_modules.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dependency_modules.sh b/dependency_modules.sh index e337837..0e2f9f9 100755 --- a/dependency_modules.sh +++ b/dependency_modules.sh @@ -24,13 +24,14 @@ set -e SRC_DIR="$(cd "$(dirname "$0")" && pwd -P)" OPEN_THREAD_DIR="${SRC_DIR}"/openthread IMAGES=`docker images --filter=reference='*:latest' | awk '{print $1}'` +OPENTHREAD_VERSION=${OPENTHREAD_VERSION:-master} function install_openthread() { if [ ! -d "${OPEN_THREAD_DIR}" ]; then - wget https://github.com/openthread/openthread/archive/master.zip - unzip master.zip - rm master.zip - mv openthread-master openthread + wget "https://github.com/openthread/openthread/archive/${OPENTHREAD_VERSION}.zip" -O openthread.zip + unzip openthread.zip + rm openthread.zip + mv "openthread-${OPENTHREAD_VERSION}" openthread fi pushd . cd openthread