From 2e34af59daab3e2342d503b6c8251229148ebf30 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 9 Jan 2023 15:02:33 +0530 Subject: [PATCH] Add 6.13 - Build patch --- scripts/chapter6/6.13-patch.sh | 27 +++++++++++++++++++++++++++ scripts/main.sh | 11 +++++++++++ 2 files changed, 38 insertions(+) create mode 100644 scripts/chapter6/6.13-patch.sh diff --git a/scripts/chapter6/6.13-patch.sh b/scripts/chapter6/6.13-patch.sh new file mode 100644 index 0000000..cd4ed67 --- /dev/null +++ b/scripts/chapter6/6.13-patch.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +cd $LFS/sources +tar xf patch-2.7.6.tar.xz +cd patch-2.7.6 + +./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 DESTIR=$LFS install + +cd $LFS/sources +rm -rf patch-2.7.6 + diff --git a/scripts/main.sh b/scripts/main.sh index 854ac03..bd08c3d 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -323,4 +323,15 @@ then stop_script "chapter6/6.12-make.sh" fi +# Chapter 6.13 +# ============ +echo "Building patch" +su - lfs -c "bash $PWD/chapter6/6.13-patch.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter6/6.13-patch.sh" +fi