From d0352e20cee0be6b6f2e113df22de04f78db702c Mon Sep 17 00:00:00 2001 From: Javernaut Date: Tue, 21 Apr 2020 13:58:21 +0300 Subject: [PATCH] simplifying the libopus download.sh --- scripts/libopus/download.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/scripts/libopus/download.sh b/scripts/libopus/download.sh index 24cbfec..701323f 100755 --- a/scripts/libopus/download.sh +++ b/scripts/libopus/download.sh @@ -1,19 +1,9 @@ #!/usr/bin/env bash -# Script to download Opus's source code - -# Exports SOURCES_DIR_libopus - path where actual sources are stored +source ${SCRIPTS_DIR}/common-functions.sh OPUS_VERSION=1.3.1 -echo "Using libopus $OPUS_VERSION" -OPUS_SOURCES=opus-${OPUS_VERSION} - -if [[ ! -d "$OPUS_SOURCES" ]]; then - TARGET_FILE_NAME=opus-${OPUS_VERSION}.tar.gz - - curl https://archive.mozilla.org/pub/opus/${TARGET_FILE_NAME} --output ${TARGET_FILE_NAME} - tar xf ${TARGET_FILE_NAME} -C . - rm ${TARGET_FILE_NAME} -fi -export SOURCES_DIR_libopus=$(pwd)/${OPUS_SOURCES} +downloadTarArchive \ + "libopus" \ + "https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz"