diff --git a/script/linux b/script/linux index df95f90eaf4..e03923cc3d7 100755 --- a/script/linux +++ b/script/linux @@ -19,6 +19,16 @@ EOF # Ubuntu, Debian, Mint, Kali, Pop!_OS, Raspbian, etc. apt=$(command -v apt-get || true) if [[ -n $apt ]]; then + if [[ "${GITHUB_ACTIONS:-}" == "true" ]]; then + # Namespace's Ubuntu sources use these mirror lists; other runners may not. + for mirror_file in /etc/apt/apt-mirrors.txt /etc/apt/apt-security-mirrors.txt; do + if [[ -f "$mirror_file" ]] && ! grep -Fxq 'https://mirror.clarkson.edu/ubuntu/' "$mirror_file"; then + printf '\n%s\n' 'https://mirror.clarkson.edu/ubuntu/' | \ + $maysudo tee -a "$mirror_file" > /dev/null + fi + done + fi + deps=( gcc g++