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 + +