From 185fe3210ba5ed6ac96e14de1d338bfcb274d133 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Sat, 3 Oct 2020 23:32:00 +0000 Subject: [PATCH] Add broken version checking script --- scripts/check-version.sh | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 scripts/check-version.sh diff --git a/scripts/check-version.sh b/scripts/check-version.sh new file mode 100755 index 0000000..9a2ac6c --- /dev/null +++ b/scripts/check-version.sh @@ -0,0 +1,61 @@ +#!/bin/sh +check_version() +{ + PKG=$1 + URL=$2 + # Check version + NAME=$(echo "$PKG" | cut -d "/" -f2) + VER=$(ls "$PKG" -1v | grep ".ebuild") + VER=$(echo "$VER" | grep -v "9999.ebuild" | tail -1) + VER=${VER#$NAME-} + VER=${VER%.ebuild} + # Check tags + if test "$(echo "$URL" | cut -d "/" -f3)" == "github.com"; then + # GitHub's API, since they don't support dumb HTTP + URL=https://api.github.com/repos${URL#https://github.com} + URL=${URL%.git} + TAG=$(wget --quiet "$URL"/tags -O - | head -3 | tail -1) + TAG=${TAG# \"name\": \"} + TAG=${TAG%\",} + else + # Git host with dumb HTTP support + TAG=$(wget --quiet "$URL"/info/refs -O - | tail -1) + TAG=$(echo "$TAG" | cut -d "/" -f3 | cut -d "^" -f1) + fi + # Remove version letter + if not expr "$TAG" : "[0-9]" > /dev/null; then + TAG=${TAG#?} + fi + # Notify user + if test "$VER" != "$TAG"; then + echo "$PKG: Update from $VER to $TAG" + fi +} + +echo "This script gets the latest version by checking for the first ref given" +echo "It's simple, but it isn't very accurate, so expect many false positives" +check_version dev-libs/libcyaml https://github.com/tlsa/libcyaml.git +check_version dev-libs/reproc https://github.com/DaanDeMeyer/reproc.git +check_version games-util/multimc5 https://github.com/MultiMC/MultiMC5.git +check_version media-libs/libaudec https://git.zrythm.org/git/libaudec +#check_version media-plugins/bitrot (No tags) +#check_version media-plugins/bolliedelayxt-lv2 (No tags) +check_version media-plugins/bslizr https://github.com/sjaehn/BSlizr.git +check_version media-plugins/dragonfly-reverb https://github.com/michaelwillis/dragonfly-reverb.git +#check_version media-plugins/eq10q (SourceForge not supported) +check_version media-plugins/geonkick https://github.com/iurie-sw/geonkick.git +#check_version media-plugins/obs-wlrobs (No tags) +check_version media-plugins/remid https://github.com/ssj71/reMID.lv2.git +check_version media-plugins/surge https://github.com/surge-synthesizer/surge.git +check_version media-plugins/tap-plugins https://github.com/tomszilagyi/tap-plugins.git +check_version media-plugins/wolf-shaper https://github.com/pdesaulniers/wolf-shaper.git +check_version media-plugins/x42-autotune https://github.com/x42/fat1.lv2.git +check_version media-plugins/x42-avldrums https://github.com/x42/avldrums.lv2.git +check_version media-plugins/x42-midifilter https://github.com/x42/midifilter.lv2.git +check_version media-plugins/x42-tuner https://github.com/x42/tuna.lv2.git +check_version media-plugins/zam-plugins https://github.com/zamaudio/zam-plugins.git +check_version media-sound/klystrack https://github.com/kometbomb/klystrack.git +check_version media-sound/zrythm https://git.zrythm.org/git/zrythm +check_version media-video/olive https://github.com/olive-editor/olive.git +check_version net-im/lightcord-bin https://github.com/Lightcord/Lightcord.git +check_version x11-libs/redkite https://github.com/iurie-sw/redkite.git