From a474501dc21cb1982293d3316a080bf7dc77266b Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 12 Jan 2023 11:04:34 +0530 Subject: [PATCH] Add 8.35 - Build libtool --- scripts/chapter8/8.35-libtool.sh | 28 ++++++++++++++++++++++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 scripts/chapter8/8.35-libtool.sh diff --git a/scripts/chapter8/8.35-libtool.sh b/scripts/chapter8/8.35-libtool.sh new file mode 100644 index 0000000..0e4e612 --- /dev/null +++ b/scripts/chapter8/8.35-libtool.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +cd /sources +tar xf libtool-2.4.7.tar.xz +cd libtool-2.4.7 + +./configure --prefix=/usr + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make check + +make install + +rm -fv /usr/lib/libltdl.a + +cd /sources +rm -rf libtool-2.4.7 diff --git a/scripts/main.sh b/scripts/main.sh index 895d61e..76fa2a3 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -954,3 +954,15 @@ then stop_script "chapter8/8.34-bash.sh" fi +# Chapter 8.35 +# ============ +echo "Building libtool" +su -c "bash $SCRIPT/chapter8/8.35-libtool.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.35-libtool.sh" +fi +