diff options
author | Erich Eckner <git@eckner.net> | 2017-07-29 21:40:27 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-07-29 21:40:27 +0200 |
commit | b33c90950e64819fc0cbe49a9600d0f19df2f264 (patch) | |
tree | 28700c41138a043e5a459d3d536e25613d181ae7 | |
parent | 07bd765ee7343ef474a423e90989cbfd5cfe172a (diff) | |
download | archlinuxewe.git.save-b33c90950e64819fc0cbe49a9600d0f19df2f264.tar.xz |
checkVersions: some bug fixes
-rwxr-xr-x | checkVersions | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/checkVersions b/checkVersions index c470befe..c69f6433 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' \ |