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