aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-21 04:42:04 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-21 04:42:04 +0100
commite636ddbaac9dd0588df5190b3a374f67a9726517 (patch)
treeea08c0619db0bc69fd30105bda9509c6f4b7f32b
parentSpaces to tabs (diff)
downloadandroid_kernel_wireguard-e636ddbaac9dd0588df5190b3a374f67a9726517.tar.xz
android_kernel_wireguard-e636ddbaac9dd0588df5190b3a374f67a9726517.zip
Limit connection time to 30 seconds
If infra fails, this will make sure we don't block people's builds. Suggested-by: Francisco Franco <franciscofranco.1990@gmail.com>
-rw-r--r--fetch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/fetch.sh b/fetch.sh
index dd6ed4d..9730f2e 100644
--- a/fetch.sh
+++ b/fetch.sh
@@ -12,7 +12,7 @@ while read -r distro package version _; do
VERSION="$version"
break
fi
-done < <(curl -A "$USER_AGENT" -LSs https://build.wireguard.com/distros.txt)
+done < <(curl -A "$USER_AGENT" -LSs --connect-timeout 30 https://build.wireguard.com/distros.txt)
[[ -n $VERSION ]]
@@ -23,6 +23,6 @@ fi
rm -rf net/wireguard
mkdir -p net/wireguard
-curl -A "$USER_AGENT" -LsS "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$VERSION.tar.xz" | tar -C "net/wireguard" -xJf - --strip-components=2 "WireGuard-$VERSION/src"
+curl -A "$USER_AGENT" -LsS --connect-timeout 30 "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$VERSION.tar.xz" | tar -C "net/wireguard" -xJf - --strip-components=2 "WireGuard-$VERSION/src"
sed -i 's/tristate/bool/;s/default m/default y/;' net/wireguard/Kconfig
touch net/wireguard/.check