Avoid failing if sources.list.d is empty

This commit is contained in:
Joshua M. Boniface 2024-04-30 01:39:23 -04:00
parent 0f59b4638b
commit 47d631b115

View File

@ -51,7 +51,7 @@ RUN apt-get update -y \
# Prepare the cross-toolchain
RUN if test "${PACKAGE_ARCH}" != "$( dpkg --print-architecture )"; then \
if grep -q -i ubuntu /etc/os-release; then \
rm /etc/apt/sources.list /etc/apt/sources.list.d/* \
rm /etc/apt/sources.list /etc/apt/sources.list.d/* || true \
&& export CODENAME="$( lsb_release -c -s )" \
&& echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \
&& echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \