From 94a173d72b73f6e6885e376bad2dec61fb0fa339 Mon Sep 17 00:00:00 2001 From: merakor Date: Fri, 24 Jul 2020 15:05:26 +0000 Subject: cpt-outdated: remove FossilOrigin-Name: 4604c7b3a1c2ba8da67f970d749073d93c73fa5bcf7ebd25f59d8afe061458f3 --- contrib/cpt-outdated | 59 ---------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100755 contrib/cpt-outdated diff --git a/contrib/cpt-outdated b/contrib/cpt-outdated deleted file mode 100755 index 27bb1ee..0000000 --- a/contrib/cpt-outdated +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# Check installed packages for updates - -old_IFS=$IFS - -# Notify the user -printf '\033[1;33m-> \033[1;36mnote \033[m%s\n' \ - "If you are doing too many requests you will note be" \ - "able to get information for every package you have" >&2 - -# List via arguments or all installed packages. -if [ "$1" ]; then - set -- printf '%s\n' "$@" -else - set -- kiss l -fi - -"$@" | (while read -r pkg _; do { - read -r ver _ < "/var/db/kiss/installed/$pkg/version" - - # Fix some package names. - case $pkg in - *-bin) fix=${pkg%%-bin} ;; - esac - - # Grab the repology version from the SVG file. - rep=$(curl -s "https://repology.org/badge/latest-versions/${fix:-$pkg}.svg") - - # Skip these instead of outputting empty - # version informations. - # shellcheck disable=2106 - case "$rep" in (*'Too Many Requests'*) continue ;; esac - - rep=${rep%*} - rep=${rep##*>} - - # Skip these. - # shellcheck disable=2106 - { - [ "${rep:--}" = - ] && continue - [ "$ver" = git ] && continue - } - - # Split the comma separated list. - # shellcheck disable=2086 - { - IFS=', ' - set -f - set +f -- $rep - IFS=$old_IFS - } - - # Parse comma separated version lists. - { - for v; do case $v in "$ver") match=1; esac; done - - [ "$match" ] || printf '%s\n' "$pkg $ver -> $rep" - } -} & done; wait) -- cgit v1.2.3