diff --git a/scripts/chapter6/6.10-grep.sh b/scripts/chapter6/6.10-grep.sh new file mode 100644 index 0000000..6e9b300 --- /dev/null +++ b/scripts/chapter6/6.10-grep.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +cd $LFS/sources +tar xf grep-3.7.tar.xz +cd grep-3.7 + +./configure --prefix=/usr \ + --host=$LFS_TGT + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make DESTDIR=$LFS install + diff --git a/scripts/main.sh b/scripts/main.sh index a261ab9..bdd2d4f 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -287,3 +287,16 @@ then stop_script "chapter6/6.9-gawk.sh" fi +# Chapter 6.10 +# ============ +echo "Building grep" +su - lfs -c "bash $PWD/chapter6/6.10-grep.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + exit 1 +fi + +