summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-08-29 11:49:38 +0200
committerErich Eckner <git@eckner.net>2016-08-29 11:49:38 +0200
commitf2d152bd5f69fd3a9c7db84fba8a63e407fa7c74 (patch)
tree6314b259df4f7831c82bfed0af16bbc8287559e9
parent1a5e64cad23981ef19abdba19b7f27565f81d6f6 (diff)
downloadarchlinuxewe.git.save-f2d152bd5f69fd3a9c7db84fba8a63e407fa7c74.tar.xz
checkVersions kann jetzt auch bitbucket
-rwxr-xr-xcheckVersions21
1 files changed, 21 insertions, 0 deletions
diff --git a/checkVersions b/checkVersions
index 1b4bf6e2..1fc89278 100755
--- a/checkVersions
+++ b/checkVersions
@@ -367,6 +367,27 @@ then
sort -V | \
tail -n1
)"
+ elif echo "${src}" | \
+ grep -q 'https://bitbucket\.org/.*/get/[^/]\+$'
+ then
+ srcPreNam="$(
+ echo "${src}" | \
+ sed 's|^.*/\([^/0-9]\+_\)[0-9][^/]\+$|\1|'
+ )"
+ srcEndg="$(
+ echo "${src}" | \
+ sed 's|^.*\(\.tar[^/]*\)$|\1|' | \
+ sed 's|\.|\\.|g'
+ )"
+ remVer="$(
+ curl "${src%/get/*}/downloads?tab=tags" 2> /dev/null | \
+ tr '"' '\n' | \
+ grep "${srcEndg}\$" | \
+ sed "s|^.*/${srcPreNam}\(.*\)${srcEndg}\$|\1|" | \
+ tr '_' '.' | \
+ sort -V | \
+ tail -n1
+ )"
else
continue
fi