From 5d97b5afaea0ddd678b2da998eb83471e96dab5d Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 9 Jan 2023 14:16:32 +0530 Subject: [PATCH] Add 6.11 - Build gzip --- scripts/chapter6/6.11-gzip.sh | 25 +++++++++++++++++++++++++ scripts/main.sh | 13 ++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 scripts/chapter6/6.11-gzip.sh diff --git a/scripts/chapter6/6.11-gzip.sh b/scripts/chapter6/6.11-gzip.sh new file mode 100644 index 0000000..3f8fab3 --- /dev/null +++ b/scripts/chapter6/6.11-gzip.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +cd $LFS/sources +tar xf gzip-1.12.tar.xz +cd gzip-1.12 + +./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 + +cd $LFS/sources +rm -rf gzip-1.12 + diff --git a/scripts/main.sh b/scripts/main.sh index bdd2d4f..6573a07 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -296,7 +296,18 @@ su - lfs -c "bash $PWD/chapter6/6.10-grep.sh" check_exit_code if [ $exit_status -ne 0 ] then - exit 1 + stop_script "chapter6/6.10-grep.sh" fi +# Chapter 6.11 +# ============ +echo "Building gzip" +su - lfs -c "bash $PWD/chapter6/6.11-gzip.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter6/6.11-gzip.sh" +fi