From 43e733e06a8e7b865ff9eb9094cb9aed44da8eca Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 6 Aug 2022 20:54:45 +0100 Subject: [PATCH] =?UTF-8?q?apt-cache:=20rewrite=20all=20sources=20https:?= =?UTF-8?q?=20=E2=86=92=20http:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/steps-config/10-apt-cache.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/steps-config/10-apt-cache.sh b/src/steps-config/10-apt-cache.sh index c51029c..099bdfe 100755 --- a/src/steps-config/10-apt-cache.sh +++ b/src/steps-config/10-apt-cache.sh @@ -11,22 +11,16 @@ enable_apt_cache() { # From /etc/os-release - see run.sh if [[ "${ID}" == "raspbian" ]]; then - subtask_begin "Patching for Raspbian [ 1 / 2 ]"; - # HTTPS doesn't allow for our proxy to cache it - if [[ -r "/etc/apt/sources.list.d/raspi.list" ]]; then - sed -i 's/https:/http:/g' /etc/apt/sources.list.d/raspi.list - fi - subtask_end "$?"; - - subtask_begin "Patching for Raspbian [ 2 / 2 ]"; + subtask_begin "Patching for Raspbian"; if [[ -e "/etc/apt/sources.list.d/raspi" ]]; then rm /etc/apt/sources.list.d/raspi; fi subtask_end "$?"; fi + # HTTPS doesn't allow for our proxy to cache it subtask_begin "Reconfiguring existing apt sources https → http"; - sed -i 's/https:\/\//http:\/\//g' /etc/apt/sources.list; + sed -i 's/https:/http:/g' /etc/apt/sources.list; find /etc/apt/sources.list.d/ -type f -iname '*.list' -print0 | xargs -0 -n1 sed -i 's/https:\/\//http:\/\//g'; subtask_end "$?";