From 27afc7b3848eaf6d1e4c5c35c3a67f4c9cee1a7c Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 23 Jan 2018 14:27:56 -0500 Subject: Use travis_retry on apt-get update Script modified from https://unix.stackexchange.com/questions/175146/apt-get-update-exit-status I stuck the code in "install" rather than "before_install" so that the lint target didn't need to be changed. I also haven't touched the targets that add more packages; I'll leave that to someone who knows more about the "&" and "*" syntax being used in the configuration. --- dev/tools/sudo-apt-get-update.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 dev/tools/sudo-apt-get-update.sh (limited to 'dev') diff --git a/dev/tools/sudo-apt-get-update.sh b/dev/tools/sudo-apt-get-update.sh new file mode 100755 index 0000000000..f8bf6bed41 --- /dev/null +++ b/dev/tools/sudo-apt-get-update.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +(sudo apt-get update "$@" 2>&1 || echo 'E: update failed') | tee /tmp/apt.err +! grep -q '^\(E:\|W: Failed to fetch\)' /tmp/apt.err || exit $? -- cgit v1.2.3