diff --git a/scripts/chapter6/6.9-gawk.sh b/scripts/chapter6/6.9-gawk.sh new file mode 100644 index 0000000..5811e09 --- /dev/null +++ b/scripts/chapter6/6.9-gawk.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +cd $LFS/sources +tar xf gawk-5.1.1.tar.xz +cd gawk-5.1.1 + +sed -i 's/extras//' Makefile.in + +./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess) + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make DESTDIR=$LFS install + +cd $LFS/sources +rm -rf gawk-5.1.1 + diff --git a/scripts/main.sh b/scripts/main.sh index d8c75a8..a261ab9 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -275,3 +275,15 @@ then stop_script "chapter6/6.8-findutils.sh" fi +# Chapter 6.9 +# =========== +echo "Building gawk" +su - lfs -c "bash $PWD/chapter6/6.9-gawk.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter6/6.9-gawk.sh" +fi +