summaryrefslogtreecommitdiffstats
path: root/bin/list-versions_engywuck.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-09 04:21:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-09 04:21:55 +0000
commit453cc058d9ee6d7cb47529d99061216e72149a5f (patch)
tree38e3683d9cb52c2f181d65ba513554a5e1387f20 /bin/list-versions_engywuck.sh
parentInitial commit. (diff)
downloadprogress-linux-tools-453cc058d9ee6d7cb47529d99061216e72149a5f.tar.xz
progress-linux-tools-453cc058d9ee6d7cb47529d99061216e72149a5f.zip
Adding bin.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/list-versions_engywuck.sh')
-rwxr-xr-xbin/list-versions_engywuck.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/bin/list-versions_engywuck.sh b/bin/list-versions_engywuck.sh
new file mode 100755
index 0000000..1dafb41
--- /dev/null
+++ b/bin/list-versions_engywuck.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+DATE="20210206T105319Z" # 10.8 release
+
+set -e
+
+if [ ! -e /tmp/list-versions_sources.buster-freeze ]
+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-freeze
+ done
+fi
+
+if [ ! -e /tmp/list-versions_sources.buster-release ]
+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.buster-release
+ done
+fi
+
+List ()
+{
+ PACKAGE="${@}"
+
+ FREEZE="$(sed -n "/^Package: ${PACKAGE}$/,/^Version:/p" /tmp/list-versions_sources.buster-freeze | awk '/^Version: / { print $2 }' | tail -n1)"
+ RELEASE="$(sed -n "/^Package: ${PACKAGE}$/,/^Version:/p" /tmp/list-versions_sources.buster-release | awk '/^Version: / { print $2 }' | tail -n1)"
+
+ VERSIONS="$(wget -q http://snapshot.debian.org/package/${PACKAGE}/ -O - | grep '<li><a href=' | awk -F\> '{ print $3 }' | sed -e 's|<.*$||' | grep -v 'bpo' | grep -v 'deb[0-9]u')"
+ VERSIONS="$(echo ${VERSIONS} | sed -e "s|.*\(${RELEASE}\)|\1|" -e "s|\(${FREEZE}\).*|\1|")"
+
+ clear
+ echo "Package: ${PACKAGE}"
+ echo
+ echo ${VERSIONS} | sed -e 's| |\n|g' | sort -V
+ echo
+ echo "# releases: $(echo ${VERSIONS} | sed -e 's| |\n|g' | wc -l)"
+ echo
+ echo "freeze: ${FREEZE}"
+ echo "release: ${RELEASE}"
+ echo
+ echo
+}
+
+if [ -n "${1}" ]
+then
+ for DEB in ${@}
+ do
+ List ${DEB}
+ done
+else
+ while true
+ do
+ echo -n "Package: "
+ read DEB
+ echo
+
+ List ${DEB}
+
+ read input
+ done
+fi