summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-03-02 10:58:52 +0100
committerErich Eckner <git@eckner.net>2020-03-02 10:58:52 +0100
commit4fbef3fd7b003b58863d243c1955741922ce9bf2 (patch)
tree172a19a005977112a6f0b9fac3dd035d1ce3c5a2
parent15d9eb9f6d586a9f8fe598485517cf9af5be4620 (diff)
downloadarchlinuxewe-4fbef3fd7b003b58863d243c1955741922ce9bf2.tar.xz
checkVersions: really learn lilypond
-rwxr-xr-xcheckVersions40
1 files changed, 31 insertions, 9 deletions
diff --git a/checkVersions b/checkVersions
index 3d356d402..ed802ea7c 100755
--- a/checkVersions
+++ b/checkVersions
@@ -841,15 +841,37 @@ then
elif echo "${src}" | \
grep -q '^https\?://lilypond\.org/'
then
- quVer="${src%/*}/"
- remVer="$( \
- curl_it "${quVer}" | \
- tr '"<>' '\n\n\n' | \
- grep "^lilypond-[0-9.]\+\(-[0-9]\+\.documentation\)\?\.t\(ar\(\.[gx]z\|\.bz2\)\?\|gz\)\$" | \
- sed "s@^lilypond-\([0-9.]\+\)\(-[0-9]\+\.documentation\)\?\.t\(ar\(\.[gx]z\|\.bz2\)\?\|gz\)\$@\1@" | \
- tr '_' '.' | \
- latest_version
- )"
+ if echo "${src}" \
+ | grep -q '/v\?\([^/]\+\)/[^/]\+-\1[^/]\+$'; then
+ quVers=$(
+ curl_it "${src%/*/*}/" \
+ | sed '
+ s@^.*<a href="\(v[0-9.]\+\)/">\1/</a>.*$@\1/@
+ t
+ d
+ ' \
+ | sort -Vr \
+ | sed 's@^@'"${src%/*/*}/"'@'
+ )
+ else
+ quVers="${src%/*}/"
+ fi
+ for quVer in ${quVers}; do
+ remVer=$(
+ curl_it "${quVer}" \
+ | tr '"<>' '\n' \
+ | sed '
+ s@^lilypond-\([0-9.]\+\)\(-[0-9]\+\.documentation\)\?\.t\(ar\(\.[gx]z\|\.bz2\)\?\|gz\)$@\1@
+ t
+ d
+ ' \
+ | tr '_' '.' \
+ | latest_version
+ )
+ if [ -n "${remVer}" ]; then
+ break
+ fi
+ done
elif echo "${src}" | \
grep -qF '//www.cybernoia.de/'; then
quVer="${src%/*}.html"