#!/bin/sh DATE="20190706T233220Z" set -e if [ ! -e /tmp/list-versions_sources.buster ] then for ARCHIVE_AREA in main contrib non-free do wget "http://snapshot.debian.org/archive/debian/${DATE}/dists/buster/${ARCHIVE_AREA}/source/Sources.xz" -O - | xz -c -d >> /tmp/list-versions_sources.buster done fi if [ ! -e /tmp/list-versions_sources.sid ] then for ARCHIVE_AREA in main contrib non-free do wget "http://debian.ethz.ch/debian/dists/sid/${ARCHIVE_AREA}/source/Sources.xz" -O - | xz -c -d >> /tmp/list-versions_sources.sid done fi List () { PACKAGE="${@}" BUSTER="$(sed -n "/^Package: ${PACKAGE}$/,/^Version:/p" /tmp/list-versions_sources.buster | awk '/^Version: / { print $2 }' | tail -n1)" SID="$(sed -n "/^Package: ${PACKAGE}$/,/^Version:/p" /tmp/list-versions_sources.sid | awk '/^Version: / { print $2 }' | tail -n1)" VERSIONS="$(wget -q http://snapshot.debian.org/package/${PACKAGE}/ -O - | grep '