summaryrefslogtreecommitdiff
path: root/checkVersions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-06-11 08:42:49 +0200
committerErich Eckner <git@eckner.net>2020-06-11 08:42:49 +0200
commitf10eea7ceee06447943e599efe2689562ffde816 (patch)
treeefe2a6e4db1f7da1e4469ec9de40d8351c6892a5 /checkVersions
parent41fa5a42fac18b79f24a6ed29b80c5ef0beeccd8 (diff)
downloadarchlinuxewe-f10eea7ceee06447943e599efe2689562ffde816.tar.xz
checkVersions: accept rc versions, too, iff the current version is a rc already
Diffstat (limited to 'checkVersions')
-rwxr-xr-xcheckVersions22
1 files changed, 18 insertions, 4 deletions
diff --git a/checkVersions b/checkVersions
index 28dfd163b..f945f7a49 100755
--- a/checkVersions
+++ b/checkVersions
@@ -957,14 +957,28 @@ then
fi
done
quVer="${src%/*}/"
- remVer="$( \
+ if printf '%s\n' "${pkgver}" \
+ | grep -qx '[0-9.]\+_[0-9.]\+_rc[0-9]\+'; then
+ ist_rc=true
+ ver_match='[0-9._]\+[a-z]\?\(-rc[0-9]\+\)\?'
+ else
+ ist_rc=false
+ ver_match='[0-9._]\+[a-z]\?'
+ fi
+ remVer=$( \
curl_it "${quVer}" | \
tr '"<>' '\n\n\n' | \
- grep "^${pkgname#python2-}\(-src\)\?-\?v\?[0-9._]\+[a-z]\?\.t\(ar\(\.[gx]z\|\.bz2\)\?\|gz\)\$" | \
- sed "s@^${pkgname#python2-}\(-src\)\?-\?v\?\([0-9._]\+[a-z]\?\)\.t\(ar\(\.[gx]z\|\.bz2\)\?\|gz\)\$@\2@" | \
+ sed '
+ s@^'"${pkgname#python2-}"'\(-src\)\?-\?v\?\('"${ver_match}"'\)\.t\(ar\(\.[gx]z\|\.bz2\)\?\|gz\)$@\2@
+ t
+ d
+ ' | \
tr '_' '.' | \
+ sed '
+ s/^\(\S\+\)-\(rc[0-9]\+\)$/'"${pkgver%%_*}"'_\1_\2/
+ ' | \
latest_version
- )"
+ )
elif echo "${src}" | \
grep -qF "$(
printf '%s\n' \