extract common download
This commit is contained in:
@@ -6,6 +6,7 @@ SCRIPTS_DIR=$(realpath ${SCRIPTS_DIR})
|
||||
CURRENT_DIR=${SCRIPTS_DIR}/..
|
||||
CURRENT_DIR=$(realpath "${CURRENT_DIR}")
|
||||
|
||||
. "${CURRENT_DIR}/scripts/download.sh"
|
||||
. "${CURRENT_DIR}/src/scripts/versions.sh"
|
||||
. "${CURRENT_DIR}/src/scripts/libraries.sh"
|
||||
|
||||
@@ -34,12 +35,9 @@ function download_and_update_hash() {
|
||||
rm -r ${CURRENT_DIR}/support/${CLEANUP_LIST[0]}
|
||||
fi
|
||||
|
||||
rm -f "${CURRENT_DIR}/support/${ITEM_LIST[2]}/${ITEM_LIST[1]}"
|
||||
rm -f "${CURRENT_DIR}/support/${ITEM_LIST[2]}/${ITEM_LIST[1]}.sha256"
|
||||
|
||||
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
|
||||
pushd "${CURRENT_DIR}/support/${ITEM_LIST[2]}"
|
||||
|
||||
Reference in New Issue
Block a user