diff --git a/scripts/chapter8/8.58-findutils.sh b/scripts/chapter8/8.58-findutils.sh new file mode 100644 index 0000000..ac31a53 --- /dev/null +++ b/scripts/chapter8/8.58-findutils.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +cd /sources +tar xf findutils-4.9.0.tar.xz +cd findutils-4.9.0 + +case $(uname -m) in + i?86) TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;; + x86_64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;; +esac + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +chown -Rv tester . +su tester -c "PATH=$PATH make check" + +make install + +cd /sources +rm -rf findutils-4.9.0 diff --git a/scripts/main.sh b/scripts/main.sh index b430de9..edc1751 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -1234,3 +1234,15 @@ then stop_script "chapter8/8.57-gawk.sh" fi +# Chapter 8.58 +# ============ +echo "Building findutils" +su -c "bash $SCRIPT/chapter8/8.58-findutils.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.58-findutils.sh" +fi +