aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2016-03-23 10:40:40 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2016-03-23 10:40:40 -0700
commitf8f99ed3c0186e38b142f5cfb44bc057aaac802b (patch)
tree99f6ca17561a7ea4ba288372485a3d0e2a0c7950 /bin/update-downloads.sh
parentAdd GSoC acceptance announcement (diff)
downloadwww-f8f99ed3c0186e38b142f5cfb44bc057aaac802b.tar.gz
www-f8f99ed3c0186e38b142f5cfb44bc057aaac802b.tar.bz2
www-f8f99ed3c0186e38b142f5cfb44bc057aaac802b.zip
Add explicit timeouts to all scripts; we had a wget that was stuck for a month
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'bin/update-downloads.sh')
-rwxr-xr-xbin/update-downloads.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/update-downloads.sh b/bin/update-downloads.sh
index 386de1f..8dea718 100755
--- a/bin/update-downloads.sh
+++ b/bin/update-downloads.sh
@@ -3,20 +3,21 @@ ARCHES=(amd64 x86 alpha arm hppa ia64 mips ppc s390 sh sparc)
echo -n 'Updating downloads...'
+# TODO: fix this handling for temp files and if one of the downloads fails but not others.
for arch in "${ARCHES[@]}"; do
mkdir -p _data/downloads/${arch}/
- wget "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-iso.txt" -O _data/downloads/${arch}/iso.txt 2>/dev/null
- wget "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-stage3.txt" -O _data/downloads/${arch}/stage3.txt 2>/dev/null
+ wget -T 60 "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-iso.txt" -O _data/downloads/${arch}/iso.txt 2>/dev/null
+ wget -T 60 "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-stage3.txt" -O _data/downloads/${arch}/stage3.txt 2>/dev/null
if [ ${arch} = "amd64" ]; then
- wget "http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-admincd-amd64.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+ wget -T 60 "http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-admincd-amd64.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
elif [ ${arch} = "s390" ]; then
- wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
- wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
- wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
- wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+ wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+ wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+ wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+ wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
elif [ ${arch} = "x86" ]; then
- wget "http://distfiles.gentoo.org/releases/x86/autobuilds/latest-admincd-x86.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+ wget -T 60 "http://distfiles.gentoo.org/releases/x86/autobuilds/latest-admincd-x86.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
fi
done