From d17076689b1b9102aa262a1267282886029cc1ec Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 9 Jan 2023 11:50:53 +0530 Subject: [PATCH] Add 6.8 - Build findutils --- scripts/chapter6/6.8-findutils.sh | 28 ++++++++++++++++++++++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 scripts/chapter6/6.8-findutils.sh diff --git a/scripts/chapter6/6.8-findutils.sh b/scripts/chapter6/6.8-findutils.sh new file mode 100644 index 0000000..eb5b7f2 --- /dev/null +++ b/scripts/chapter6/6.8-findutils.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +cd $LFS/sources +tar xf findutils-4.9.0.tar.xz +cd findutils-4.9.0 + +./configure --prefix=/usr \ + --localstatedir=/var/lib/locate \ + --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 findutils-4.9.0 + diff --git a/scripts/main.sh b/scripts/main.sh index 465db07..d8c75a8 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -263,3 +263,15 @@ then stop_script "chapter6/6.7-file.sh" fi +# Chapter 6.8 +# =========== +echo "Building findutils" +su - lfs -c "bash $PWD/chapter6/6.8-findutils.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter6/6.8-findutils.sh" +fi +