extract common download
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
CURRENT_DIR=$(realpath "$0")
|
||||
CURRENT_DIR=$(dirname "${CURRENT_DIR}")
|
||||
|
||||
. "${CURRENT_DIR}/scripts/download.sh"
|
||||
. "${CURRENT_DIR}/src/scripts/versions.sh"
|
||||
. "${CURRENT_DIR}/src/scripts/libraries.sh"
|
||||
|
||||
@@ -10,11 +11,8 @@ function download_package() {
|
||||
local NAME=$1
|
||||
local ITEM_LIST=(${PROJECT_DOWNLOADS[${NAME}]//;/ })
|
||||
if [ ! -f "${CURRENT_DIR}/support/${ITEM_LIST[2]}/${ITEM_LIST[1]}" ]; then
|
||||
rm -f "${CURRENT_DIR}/support/${ITEM_LIST[2]}/${ITEM_LIST[1]}"
|
||||
|
||||
if ! wget --tries=5 --waitretry=5 ${ITEM_LIST[0]} -O "${CURRENT_DIR}/support/${ITEM_LIST[2]}/${ITEM_LIST[1]}"; then
|
||||
if ! download_file "${ITEM_LIST[0]}" "${CURRENT_DIR}/support/${ITEM_LIST[2]}/${ITEM_LIST[1]}"; then
|
||||
echo "failed $NAME"
|
||||
rm -f "${CURRENT_DIR}/support/${ITEM_LIST[2]}/${ITEM_LIST[1]}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user