Skip to content

Commit

Permalink
Revert "downloader fix up URLs parellel"
Browse files Browse the repository at this point in the history
This reverts commit 3620d06.
  • Loading branch information
danoli3 committed May 27, 2024
1 parent 3620d06 commit 1e2e828
Showing 1 changed file with 16 additions and 27 deletions.
43 changes: 16 additions & 27 deletions scripts/dev/downloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,33 +80,22 @@ downloader() {
for URL in "${URLS[@]}"; do
FILENAME=$(basename "$URL")
echo "Downloading [$FILENAME] @ [$URL]"
if command -v wget2 2>/dev/null; then
echo " [wget2]"
URLS_TO_DOWNLOAD+=("$URL")
elif command -v curl 2>/dev/null; then
echo " [cURL]"
URLS_TO_DOWNLOAD+=("-O $URL")
else
echo " [wget]"
URLS_TO_DOWNLOAD+=("$URL")
fi;
done
if [[ "${SILENT}" == "1" ]]; then
if command -v wget2 2>/dev/null; then
wget2 -q $URLS_TO_DOWNLOAD 2> /dev/null;
elif command -v curl 2>/dev/null; then
curl -L --parallel --retry 20 -s $SSL_ARGS -N $URLS_TO_DOWNLOAD;
else
wget -q $URLS_TO_DOWNLOAD 2> /dev/null;
fi;
else
if command -v wget2 2>/dev/null; then
wget2 --progress=bar $URLS_TO_DOWNLOAD 2> /dev/null;
elif command -v curl 2>/dev/null; then
curl -L --parallel --retry 20 --progress-bar -N $SSL_ARGS $URLS_TO_DOWNLOAD || echo $?;
if [[ "${SILENT}" == "1" ]]; then
if command -v wget2 2>/dev/null; then
wget2 -q $URL 2> /dev/null;
elif command -v curl 2>/dev/null; then
curl -L --parallel --retry 20 -s $SSL_ARGS -N -O $URL;
else
wget -q $URL 2> /dev/null;
fi;
else
wget --progress=bar $URLS_TO_DOWNLOAD 2> /dev/null;
if command -v wget2 2>/dev/null; then
wget2 --progress=bar $URL 2> /dev/null;
elif command -v curl 2>/dev/null; then
curl -L --parallel --retry 20 --progress-bar -N $SSL_ARGS -O $URL || echo $?;
else
wget --progress=bar $URL 2> /dev/null;
fi
fi
fi

done
}

0 comments on commit 1e2e828

Please sign in to comment.