#!/bin/sh

http_source="http://ftp.de.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/"
version="390.77-1~bpo9"

for file in `wget -qO- "${http_source}" | ./bquery a -a href | grep "${version}" | grep -e '_amd64\.deb' -e '_all\.deb' -e '\.dsc' -e '\.tar\.xz'`; do
  wget "${http_source}${file}"
done

http_source="http://ftp.de.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/"
version="390.77"

for file in `wget -qO- "${http_source}" | ./bquery a -a href | grep "${version}" | grep -e '\.orig\.tar\.gz' -e '\.orig-i386\.tar\.gz' -e '\.orig-amd64\.tar\.gz' -e '\.orig-armhf\.tar\.gz'`; do
  wget "${http_source}${file}"
done
