From 9b79fb3b45ba995a748b9de0dd9a6d8d82830ed6 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 9 Jan 2023 14:11:23 +0530 Subject: [PATCH] Add 6.10 - Build grep --- scripts/chapter6/6.10-grep.sh | 23 +++++++++++++++++++++++ scripts/main.sh | 13 +++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 scripts/chapter6/6.10-grep.sh 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 + +