#!/bin/sh

# https://www.scala-sbt.org/0.13/docs/Installing-sbt-on-Linux.html
http_source="https://dl.bintray.com/sbt/debian/"
version="1.2.3"

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