mirror of https://github.com/marcosfad/mbp-ubuntu
24 lines
643 B
Bash
Executable File
24 lines
643 B
Bash
Executable File
#!/bin/bash
|
|
set -eu -o pipefail
|
|
|
|
echo >&2 "===]> Info: Checkout bootstrap... "
|
|
debootstrap \
|
|
--arch=amd64 \
|
|
--variant=minbase \
|
|
focal \
|
|
"${CHROOT_PATH}" \
|
|
http://archive.ubuntu.com/ubuntu/
|
|
|
|
echo >&2 "===]> Info: Creating chroot environment... "
|
|
mount --bind /dev "${CHROOT_PATH}/dev"
|
|
mount --bind /run "${CHROOT_PATH}/run"
|
|
|
|
cp -r "$ROOT_PATH/files" "${CHROOT_PATH}/tmp/setup_files"
|
|
chroot "${CHROOT_PATH}" /bin/bash -c "KERNEL_VERSION=${KERNEL_VERSION} /tmp/setup_files/chroot_build.sh"
|
|
|
|
echo >&2 "===]> Info: Cleanup the chroot environment... "
|
|
# In docker there is no run?
|
|
#umount "${CHROOT_PATH}/run"
|
|
umount "${CHROOT_PATH}/dev"
|
|
|