From f2d152bd5f69fd3a9c7db84fba8a63e407fa7c74 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 29 Aug 2016 11:49:38 +0200 Subject: checkVersions kann jetzt auch bitbucket --- checkVersions | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 -- cgit v1.2.3-70-g09d2