diff --git a/scripts/chapter8/8.33-grep.sh b/scripts/chapter8/8.33-grep.sh new file mode 100644 index 0000000..c464129 --- /dev/null +++ b/scripts/chapter8/8.33-grep.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +cd /sources +tar xf grep-3.7.tar.xz +cd grep-3.7 + +./configure --prefix=/usr + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] + +then + exit 1 +fi + +make check + +make install + +cd /sources +rm -rf grep-3.7 diff --git a/scripts/main.sh b/scripts/main.sh index 8435036..db8ce55 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -930,3 +930,15 @@ then stop_script "chapter8/8.32-bison.sh" fi +# Chapter 8.33 +# ============ +echo "Building grep" +su -c "bash $SCRIPT/chapter8/8.33-grep.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.33-grep.sh" +fi +