mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
Rerun apt-get if it failed
We often get errors due to repositories being updated, so retry running apt when this happens to see if it helps.
This commit is contained in:
@@ -96,12 +96,16 @@ tmstamp()
|
||||
echo -n "[$(date '+%H:%M:%S')]" ;
|
||||
}
|
||||
|
||||
# Disable some (but not all) output.
|
||||
SOCI_APT_OPTIONS='-q -y -o=Dpkg::Use-Pty=0 --no-install-recommends'
|
||||
|
||||
run_apt()
|
||||
{
|
||||
# Disable some (but not all) output.
|
||||
sudo apt-get $SOCI_APT_OPTIONS "$@"
|
||||
if ! sudo apt-get $SOCI_APT_OPTIONS "$@"; then
|
||||
echo "apt-get "$@" failed, retrying once just in case it was spurious..."
|
||||
sleep 30
|
||||
sudo apt-get $SOCI_APT_OPTIONS "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
run_make()
|
||||
|
||||
Reference in New Issue
Block a user