#!/bin/sh

http_source="http://ftp.de.debian.org/debian/pool/non-free/n/nvidia-cuda-toolkit/"
version="9.1.85-4~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-cuda-toolkit/"
version="9.1.85"

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