From 6a3a783ac72d886481b2b051f08539d0a332be5d Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 9 Jan 2023 11:06:59 +0530 Subject: [PATCH] Add 6.4 - Build bash --- scripts/chapter6/6.4-bash.sh | 29 +++++++++++++++++++++++++++++ scripts/main.sh | 13 +++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 scripts/chapter6/6.4-bash.sh diff --git a/scripts/chapter6/6.4-bash.sh b/scripts/chapter6/6.4-bash.sh new file mode 100644 index 0000000..52cbd76 --- /dev/null +++ b/scripts/chapter6/6.4-bash.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +cd $LFS/sources +tar xf bash-5.1.16.tar.gz +cd bash-5.1.16 + +./configure --prefix=/usr \ + --build=$(support/config.guess) \ + --host=$LFS_TGT \ + --without-bash-malloc + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make DESTDIR=$LFS install + +ln -sv bash $LFS/bin/sh + +cd $LFS/sources +rm -rf bash-5.1.16 diff --git a/scripts/main.sh b/scripts/main.sh index acfbc31..417266e 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -215,3 +215,16 @@ then stop_script "chapter6/6.3-ncurses.sh" fi +# Chapter 6.4 +# =========== +echo "Building bash" +su - lfs -c "bash $PWD/chapter6/6.4-bash.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter6/6.4-bash.sh" +fi + +