Skip to content

Commit c9b3aad

Browse files
committed
download libs validate downloads before overrwite and 2.8.0. wget2 disabled for the moment
1 parent 6f059e0 commit c9b3aad

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

scripts/dev/download_libs.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LEGACY=0
88
SILENT_ARGS=""
99
NO_SSL=""
1010
BLEEDING_EDGE=0
11-
DL_VERSION=2.7.5
11+
DL_VERSION=2.8.0
1212
GCC_VERSION=0
1313
TAG=""
1414

@@ -351,6 +351,18 @@ cd download
351351
download "${PKGS[@]}"
352352

353353
cd ../ # back to libs
354+
VALID=true
355+
for PKG in $PKGS; do
356+
echo " Validate libraries [${PLATFORM}] from [$PKG]"
357+
if [ ! -f "download/$PKG" ]; then
358+
echo "Error: File 'download/$PKG' does not exist!" >&2
359+
VALID=false
360+
fi
361+
done
362+
if [ $VALID -eq false ]; then
363+
exit 71
364+
fi
365+
354366
libs=("boost" "cairo" "curl" "FreeImage" "brotli" "fmod" "freetype" "glew" "glfw" "json" "libpng" "openssl" "pixman" "poco" "rtAudio" "tess2" "uriparser" "utf8" "videoInput" "zlib" "opencv" "ippicv" "assimp" "libxml2" "svgtiny" "fmt")
355367
if [ $OVERWRITE -eq 1 ]; then
356368
echo " "

scripts/dev/downloader.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ check_remote_vs_local() {
148148
finalurl() {
149149
local input_url="$1"
150150
local trimmed_url=$(echo "$input_url" | sed 's/[[:space:]]*$//')
151-
local resolved_url=$(curl -L -I --retry "${RETRY_MAX:-5}" --max-redirs "${MAX_REDIRECTS:-5}" \
152-
--retry-connrefused --write-out '%{url_effective}' --silent --output /dev/null "$trimmed_url")
151+
local resolved_url=$(curl -L -I --retry "${RETRY_MAX:-5}" --max-redirs "${MAX_REDIRECTS:-5}" --retry-connrefused --write-out '%{url_effective}' --silent --output /dev/null "$trimmed_url")
153152
if [[ -z "$resolved_url" ]]; then
154153
echoError "Failed to resolve URL: $trimmed_url"
155154
return 1
@@ -167,7 +166,7 @@ downloader() {
167166
NO_SSL=0
168167
COMPRESSION=1
169168
VERBOSE=0
170-
WGET2=1
169+
WGET2=0
171170
CURL=1
172171
WGET=1
173172
CLOSE_CONNECTION=1

0 commit comments

Comments
 (0)