diff --git a/scripts/libopus/download.sh b/scripts/libopus/download.sh new file mode 100755 index 0000000..24cbfec --- /dev/null +++ b/scripts/libopus/download.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Script to download Opus's source code + +# Exports SOURCES_DIR_libopus - path where actual sources are stored + +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} diff --git a/scripts/parse-arguments.sh b/scripts/parse-arguments.sh index f0dca8b..c995e6e 100755 --- a/scripts/parse-arguments.sh +++ b/scripts/parse-arguments.sh @@ -49,6 +49,10 @@ do EXTERNAL_LIBRARIES+=( "libmp3lame" ) shift ;; + --enable-libopus) + EXTERNAL_LIBRARIES+=( "libopus" ) + shift + ;; *) echo "Unknown argument $argument" ;;