Skip to content

Commit

Permalink
bootstrap-rootfs.sh: don't erase whole rootfs tarball directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sylirre committed Dec 17, 2023
1 parent b0ac7c6 commit 001b004
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 2 additions & 0 deletions distro-build/alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
2 changes: 2 additions & 0 deletions distro-build/archlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
2 changes: 2 additions & 0 deletions distro-build/artix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions distro-build/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 2 additions & 0 deletions distro-build/deepin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 2 additions & 0 deletions distro-build/fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
2 changes: 2 additions & 0 deletions distro-build/manjaro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions distro-build/opensuse.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions distro-build/pardus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions distro-build/ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 2 additions & 0 deletions distro-build/void.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 001b004

Please sign in to comment.