#!/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" source packageinstall.sh 9 lfs-bootscripts retval=$? if [[ "${retval}" -ne 0 ]]; then exit 1 fi printf "%b" "${GRN}Configuring network related files${RST}\n" source chapter9/network.sh printf "%b" "${GRN}Configuring bootscript related files${RST}\n" source chapter9/bootscriptconf.sh printf "%b" "${GRN}Configuring locale settings${RST}\n" source chapter9/bashprofile.sh printf "%b" "${GRN}Configuring inputrc${RST}\n" source chapter9/inputrc.sh printf "%b" "${GRN}Configuring system shells${RST}\n" source chapter9/shells.sh elif [[ "${CHAPTER}" -eq 10 ]]; then # Chapter 10 printf "%b" "\n${IWHT}============ ${IGRN}Building ${IYLW}Chapter 10${IWHT} \ ============${RST}\n" printf "%b" "${GRN}Creating fstab configuration${RST}\n" source chapter10/fstab.sh source packageinstall.sh 10 linux retval=$? if [[ "${retval}" -ne 0 ]]; then exit 1 fi else printf "%b" "Do \"The End\" stuff here.\n" fi