From 230b9ba210ea813ced6a8daf2c6cdb7481a5c63b Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 10 Jan 2023 15:26:58 +0530 Subject: [PATCH] Add 8.12 - Build m4 --- scripts/chapter8/8.12-m4.sh | 27 +++++++++++++++++++++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 scripts/chapter8/8.12-m4.sh 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 +