diff --git a/tools/update-scan b/tools/update-scan index 8bd2d111e2..0357a4a9e2 100755 --- a/tools/update-scan +++ b/tools/update-scan @@ -72,9 +72,9 @@ check_for_update() { esac # if pkg_version is a githash on github and github api available - always check against latest - if [[ ${PKG_VERSION} =~ ^[a-z0-9]{40} ]] && \ - [[ ${PKG_URL} =~ ^.*(github\.com).*$ ]] && \ - [[ "${github_api}" = "yes" ]]; then + if [[ ${PKG_VERSION} =~ ^[a-z0-9]{40} ]] && + [[ ${PKG_URL} =~ ^.*(github\.com).*$ ]] && + [[ "${github_api}" = "yes" ]]; then github_repos=$(echo "${PKG_URL}" | grep -oP '(?<=https:\/\/github.com\/)?[0-9A-Za-z._-]+\/[0-9A-Za-z._-]+(?=/archive|/tags|/releases)') le_master_version_date="Commit date: $(curl -sL ${github_api_token} https://api.github.com/repos/${github_repos}/git/commits/${PKG_VERSION} | jq -r '.committer.date')"