summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-03 09:04:45 +0100
committerErich Eckner <git@eckner.net>2019-01-03 09:04:45 +0100
commitb26c65b37413276505f17977beb4db5650744de6 (patch)
treee3db64c24e431b4e92d0ae63865419351ddd7e28
parentfee88885c2824416707e676b3a2d93d847bf5f24 (diff)
downloadarchlinuxewe-b26c65b37413276505f17977beb4db5650744de6.tar.xz
checkVersions: use sponge for writing curl-cache content to minimize race problems
-rwxr-xr-xcheckVersions4
1 files changed, 2 insertions, 2 deletions
diff --git a/checkVersions b/checkVersions
index 794286232..f4832453b 100755
--- a/checkVersions
+++ b/checkVersions
@@ -30,10 +30,10 @@ curl_it() {
return
fi
curl --compressed --connect-timeout 10 -s "$@" "${source}" \
- > "${cache_file}"
+ | sponge "${cache_file}"
if [ ! -s "${cache_file}" ]; then
curl --compressed --connect-timeout 10 -s -x socks5://127.0.0.1:9050 "$@" "${source}" \
- > "${cache_file}"
+ | sponge "${cache_file}"
fi
cat "${cache_file}"
}