diff --git a/bootstrap-rootfs.sh b/bootstrap-rootfs.sh index dccada331..89898aa53 100755 --- a/bootstrap-rootfs.sh +++ b/bootstrap-rootfs.sh @@ -60,7 +60,7 @@ translate_arch() { ############################################################################## # Reset workspace. This also deletes any previously made rootfs tarballs. -sudo rm -rf "${ROOTFS_DIR:?}" "${WORKDIR:?}" +sudo rm -rf "${WORKDIR:?}" mkdir -p "$ROOTFS_DIR" "$WORKDIR" cd "$WORKDIR" diff --git a/distro-build/alpine.sh b/distro-build/alpine.sh index 792528203..ade3e7a3e 100644 --- a/distro-build/alpine.sh +++ b/distro-build/alpine.sh @@ -2,6 +2,8 @@ dist_name="Alpine Linux" dist_version="3.18.4" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/alpine-*.tar.xz + for arch in aarch64 armv7 x86 x86_64; do curl --fail --location \ --output "${WORKDIR}/alpine-minirootfs-${dist_version}-${arch}.tar.gz" \ diff --git a/distro-build/archlinux.sh b/distro-build/archlinux.sh index b43b394c5..c1affb02a 100644 --- a/distro-build/archlinux.sh +++ b/distro-build/archlinux.sh @@ -2,6 +2,8 @@ dist_name="Arch Linux" dist_version="2023.03.01" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/archlinux-*.tar.xz + for arch in aarch64 armv7; do curl --fail --location \ --output "${WORKDIR}/archlinux-${arch}.tar.gz" \ diff --git a/distro-build/artix.sh b/distro-build/artix.sh index 33ffac60e..74f5ca28c 100644 --- a/distro-build/artix.sh +++ b/distro-build/artix.sh @@ -2,6 +2,8 @@ dist_name="Artix Linux" dist_version="2023.10.25" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/artix-*.tar.xz + curl --fail --location \ --output "${WORKDIR}/artix-aarch64.tar.xz" \ "https://armtixlinux.org/images/armtix-runit-20230401.tar.xz" diff --git a/distro-build/debian.sh b/distro-build/debian.sh index 24169d012..3370be3f1 100644 --- a/distro-build/debian.sh +++ b/distro-build/debian.sh @@ -2,6 +2,8 @@ dist_name="Debian" dist_version="bookworm" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/debian-*.tar.xz + for arch in arm64 armhf i386 amd64; do sudo mmdebstrap \ --architectures=${arch} \ diff --git a/distro-build/deepin.sh b/distro-build/deepin.sh index 40551d338..92c52cc3e 100644 --- a/distro-build/deepin.sh +++ b/distro-build/deepin.sh @@ -2,6 +2,8 @@ dist_name="deepin" dist_version="beige" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/deepin-*.tar.xz + for arch in amd64 arm64; do mkdir -p ${WORKDIR}/deepin-$(translate_arch "$arch")/etc/apt/trusted.gpg.d curl --fail --location \ diff --git a/distro-build/fedora.sh b/distro-build/fedora.sh index 9bc472ea3..b976ab97d 100644 --- a/distro-build/fedora.sh +++ b/distro-build/fedora.sh @@ -2,6 +2,8 @@ dist_name="Fedora" dist_version="39-1.5" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/fedora-*.tar.xz + for arch in aarch64 x86_64; do curl --fail --location \ --output "${WORKDIR}/fedora-${dist_version}-${arch}.tar.xz" \ diff --git a/distro-build/manjaro.sh b/distro-build/manjaro.sh index 0e3fe30d1..5a799c1f6 100644 --- a/distro-build/manjaro.sh +++ b/distro-build/manjaro.sh @@ -2,6 +2,8 @@ dist_name="Manjaro" dist_version="20231023" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/manjaro-*.tar.xz + curl --fail --location \ --output "${WORKDIR}/manjaro-aarch64.tar.xz" \ "https://github.com/manjaro-arm/rootfs/releases/download/${dist_version}/Manjaro-ARM-aarch64-latest.tar.gz" diff --git a/distro-build/opensuse.sh b/distro-build/opensuse.sh index 1f7592af9..f6e6a2556 100644 --- a/distro-build/opensuse.sh +++ b/distro-build/opensuse.sh @@ -1,6 +1,8 @@ dist_name="OpenSUSE" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/opensuse-*.tar.xz + opensuse_manifest=$(docker manifest inspect opensuse/tumbleweed:latest) for arch in arm64 arm 386 amd64; do if [ "$arch" = "arm" ]; then diff --git a/distro-build/pardus.sh b/distro-build/pardus.sh index 9f208489e..bf3f69a2f 100644 --- a/distro-build/pardus.sh +++ b/distro-build/pardus.sh @@ -2,6 +2,8 @@ dist_name="Pardus" dist_version="yirmibir" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/pardus-*.tar.xz + for arch in arm64 i386 amd64; do wget https://depo.pardus.org.tr/pardus/pool/main/p/pardus-archive-keyring/pardus-archive-keyring_2021.1_all.deb sudo dpkg -i pardus-archive-keyring_2021.1_all.deb diff --git a/distro-build/ubuntu.sh b/distro-build/ubuntu.sh index 1607f22cc..52484b8a6 100644 --- a/distro-build/ubuntu.sh +++ b/distro-build/ubuntu.sh @@ -2,6 +2,8 @@ dist_name="Ubuntu" dist_version="mantic" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/ubuntu-*.tar.xz + for arch in arm64 armhf amd64; do sudo mmdebstrap \ --architectures=${arch} \ diff --git a/distro-build/void.sh b/distro-build/void.sh index 4a9f1805f..a74bb0635 100644 --- a/distro-build/void.sh +++ b/distro-build/void.sh @@ -2,6 +2,8 @@ dist_name="Void Linux" dist_version="20230628" bootstrap_distribution() { + sudo rm -f "${ROOTFS_DIR}"/void-*.tar.xz + for arch in aarch64 armv7l i686 x86_64; do curl --fail --location \ --output "${WORKDIR}/void-${arch}.tar.xz" \