2022-05-25 14:02:09 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
export LC_ALL=C.UTF-8
|
2022-06-13 12:00:44 +00:00
|
|
|
{{ CMD }} --mode={{ MODE }} --dry-run --variant=apt \
|
|
|
|
--setup-hook="exit 1" \
|
|
|
|
--essential-hook="exit 1" \
|
|
|
|
--customize-hook="exit 1" \
|
|
|
|
{{ DIST }} /tmp/debian-chroot {{ MIRROR }}
|
2022-05-25 14:02:09 +00:00
|
|
|
rm /tmp/debian-chroot/dev/console
|
|
|
|
rm /tmp/debian-chroot/dev/fd
|
|
|
|
rm /tmp/debian-chroot/dev/full
|
|
|
|
rm /tmp/debian-chroot/dev/null
|
|
|
|
rm /tmp/debian-chroot/dev/ptmx
|
|
|
|
rm /tmp/debian-chroot/dev/random
|
|
|
|
rm /tmp/debian-chroot/dev/stderr
|
|
|
|
rm /tmp/debian-chroot/dev/stdin
|
|
|
|
rm /tmp/debian-chroot/dev/stdout
|
|
|
|
rm /tmp/debian-chroot/dev/tty
|
|
|
|
rm /tmp/debian-chroot/dev/urandom
|
|
|
|
rm /tmp/debian-chroot/dev/zero
|
|
|
|
rm /tmp/debian-chroot/etc/apt/sources.list
|
|
|
|
rm /tmp/debian-chroot/etc/fstab
|
|
|
|
rm /tmp/debian-chroot/etc/hostname
|
|
|
|
rm /tmp/debian-chroot/etc/resolv.conf
|
|
|
|
rm /tmp/debian-chroot/var/lib/apt/lists/lock
|
|
|
|
rm /tmp/debian-chroot/var/lib/dpkg/status
|
2022-10-16 12:47:55 +00:00
|
|
|
rm /tmp/debian-chroot/var/lib/dpkg/arch
|
2022-05-25 14:02:09 +00:00
|
|
|
# the rest should be empty directories that we can rmdir recursively
|
|
|
|
find /tmp/debian-chroot -depth -print0 | xargs -0 rmdir
|