#!/bin/bash CHAPTER="$1" # shellcheck source=colors.sh source /sources/colors.sh # shellcheck source=functions.sh source /sources/functions.sh printf "%b" "${CYN}SUCCESSFULLY ENTERED ${RED}CHROOT${RST}!\n" pushd /sources >/dev/null || exit 1 if [[ "${CHAPTER}" -eq 7 ]]; then # Chapter 7 printf "%b" "\n${IWHT}============ ${IGRN}Building ${IYLW}Chapter 7${IWHT} \ ============${RST}\n" for package in libstdc++ gettext bison perl python texinfo util-linux; do source packageinstall.sh 7 $package retval=$? if [[ "${retval}" -ne 0 ]]; then exit 1 fi done elif [[ "${CHAPTER}" -eq 8 ]]; then # Chapter 8 printf "%b" "\n${IWHT}============ ${IGRN}Building ${IYLW}Chapter 8${IWHT} \ ============${RST}\n" for package in man-pages iana-etc glibc zlib bzip2 xz zstd file readline m4 bc flex tcl expect dejagnu binutils gmp mpfr mpc isl attr acl libcap shadow gcc pkg-config ncurses sed psmisc gettext bison grep bash libtool gdbm gperf expat inetutils perl xml-parser intltool autoconf automake kmod libelf libffi openssl python ninja meson coreutils check diffutils gawk findutils groff grub less gzip iproute2 kbd libpipeline make patch man-db tar texinfo vim eudev procps-ng util-linux e2fsprogs sysklogd sysvinit; do source packageinstall.sh 8 $package retval=$? if [[ "${retval}" -ne 0 ]]; then exit 1 fi done elif [[ "${CHAPTER}" -eq 9 ]]; then # Chapter 9 printf "%b" "\n${IWHT}============ ${IGRN}Building ${IYLW}Chapter 9${IWHT} \ ============${RST}\n" for package in lfs-bootscripts network; do source packageinstall.sh network 9 $package retval=$? if [[ "${retval}" -ne 0 ]]; then exit 1 fi done else printf "%b" "Do Chapter 10 stuff here.\n" fi