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