diff --git a/scripts/chapter8/8.12-m4.sh b/scripts/chapter8/8.12-m4.sh new file mode 100644 index 0000000..21e18f4 --- /dev/null +++ b/scripts/chapter8/8.12-m4.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +cd /sources +tar xf m4-1.4.19.tar.xz +cd m4-1.4.19 + +./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 m4-1.4.19 + diff --git a/scripts/main.sh b/scripts/main.sh index 0bd8369..ed527d2 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -678,3 +678,15 @@ then stop_script "chapter8/8.11-readline.sh" fi +# Chapter 8.12 +# ============ +echo "Building m4" +su -c "bash $SCRIPT/chapter8/8.12-m4.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.12-m4.sh" +fi +