Skip to content

Commit

Permalink
Download changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DamMicSzm committed Jul 29, 2022
1 parent 577e1e7 commit 9862e83
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,18 @@ function show_dependencies() {
function download() {
echo "$COLOR_BLUE"

for package in "${@:2}"; do
wget -r -nd --no-parent --progress=dot:mega -A "$package" "$1"
PKGS=()
for PKG in "${@:2}"; do
PKGS+=("-A" "$PKG")
done
wget -r -nd --no-parent --progress=dot:mega "${PKGS[@]}" "$1"

# Check if the files have been downloaded
for PKG in "${@:2}"; do
if [[ ! $(find . -type f -name "$PKG") ]]; then
error "PKG is missing: $PKG"
return 1
fi
done

echo -n "$COLOR_NONE"
Expand Down

0 comments on commit 9862e83

Please sign in to comment.