From b33c90950e64819fc0cbe49a9600d0f19df2f264 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 29 Jul 2017 21:40:27 +0200 Subject: checkVersions: some bug fixes --- checkVersions | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/checkVersions b/checkVersions index c470befe1..c69f64336 100755 --- a/checkVersions +++ b/checkVersions @@ -10,15 +10,9 @@ usage() { } curl_it() { - if ping -c1 -W5 "$( - echo "$1" | \ - sed ' - s|^[^/]\+://|| - s|/.*$|| - ' - )" > /dev/null 2>&1; then - curl -sS "$1" - fi + local source="$1" + shift + curl --connect-timeout 5 -sS "$@" "${source}" } me="$(readlink -f $0)" @@ -113,7 +107,7 @@ then if [ "${pkgname}" == "adduser" ] then remVer="$( - curl_it "${source[0]}" | \ + curl_it "${source[0]}" '-L' | \ grep '^# Version: ' | \ sed 's|^# Version: \+||' )" @@ -448,7 +442,7 @@ then elif echo "${src}" | \ grep -q "$( printf '^https\\?://%s/\|' \ - 'alpine\.freeiz.com' \ + 'alpine\.freeiz\.com' \ 'bitbucket\.org' \ 'bindfs\.org' \ 'download\.osgeo\.org' \ -- cgit v1.2.3-70-g09d2