diff --git a/scripts/chapter6/6.15-tar.sh b/scripts/chapter6/6.15-tar.sh new file mode 100644 index 0000000..601b4be --- /dev/null +++ b/scripts/chapter6/6.15-tar.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +cd $LFS/sources +tar xf tar-1.34.tar.xz +cd tar-1.34 + +./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 DESTDIR=$LFS install + +cd $LFS/sources +rm -rf tar-1.34 + diff --git a/scripts/main.sh b/scripts/main.sh index 378a337..de22662 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -347,3 +347,15 @@ then stop_script "chapter6/6.14-sed.sh" fi +# Chapter 6.15 +# ============ +echo "Building tar" +su - lfs -c "bash $PWD/chapter6/6.15-tar.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter6/6.15-tar.sh" +fi +