summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-29 21:40:27 +0200
committerErich Eckner <git@eckner.net>2017-07-29 21:40:27 +0200
commitb33c90950e64819fc0cbe49a9600d0f19df2f264 (patch)
tree28700c41138a043e5a459d3d536e25613d181ae7
parent07bd765ee7343ef474a423e90989cbfd5cfe172a (diff)
downloadarchlinuxewe.git.save-b33c90950e64819fc0cbe49a9600d0f19df2f264.tar.xz
checkVersions: some bug fixes
-rwxr-xr-xcheckVersions16
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' \