From f0718ba7847c2f3fc5a4afe317598f8d6c7fa623 Mon Sep 17 00:00:00 2001 From: Javernaut Date: Tue, 21 Apr 2020 13:11:47 +0300 Subject: [PATCH] simplifying the ffmpeg download.sh --- scripts/ffmpeg/download.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/ffmpeg/download.sh b/scripts/ffmpeg/download.sh index bdb5819..590b3fa 100755 --- a/scripts/ffmpeg/download.sh +++ b/scripts/ffmpeg/download.sh @@ -9,17 +9,11 @@ # Getting sources of a particular FFmpeg release. # Same argument (FFmpeg version) produces the same source set. function ensureSourcesTar() { - FFMPEG_SOURCES=ffmpeg-${FFMPEG_SOURCE_VALUE} + source ${SCRIPTS_DIR}/common-functions.sh - if [[ ! -d "$FFMPEG_SOURCES" ]]; then - TARGET_FILE_NAME=ffmpeg-${FFMPEG_SOURCE_VALUE}.tar.bz2 - - curl https://www.ffmpeg.org/releases/${TARGET_FILE_NAME} --output ${TARGET_FILE_NAME} - tar xf ${TARGET_FILE_NAME} -C . - rm ${TARGET_FILE_NAME} - fi - - export SOURCES_DIR_ffmpeg=$(pwd)/${FFMPEG_SOURCES} + downloadTarArchive \ + "ffmpeg" \ + "https://www.ffmpeg.org/releases/ffmpeg-${FFMPEG_SOURCE_VALUE}.tar.bz2" } # Getting sources of a particular branch or a tag of FFmpeg's git repository.