From 7eb86e2c3f1b2752d2236e9fea30bd40d4d85307 Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 10 Jan 2023 15:43:29 +0530 Subject: [PATCH] Add 8.16 - Build expect --- scripts/chapter8/8.16-expect.sh | 32 ++++++++++++++++++++++++++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 scripts/chapter8/8.16-expect.sh diff --git a/scripts/chapter8/8.16-expect.sh b/scripts/chapter8/8.16-expect.sh new file mode 100644 index 0000000..2e553cd --- /dev/null +++ b/scripts/chapter8/8.16-expect.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +cd /sources +tar xf expect5.45.4.tar.gz +cd expect5.45.4 + +./configure --prefix=/usr \ + --with-tcl=/usr/lib \ + --enable-shared \ + --mandir=/usr/share/man \ + --with-tclinclude=/usr/include + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make test + +make install +ln -svf expect5.45.4/libexpect5.45.4.so /usr/lib + +cd /sources +rm -rf expect5.45.4 + diff --git a/scripts/main.sh b/scripts/main.sh index cdbf671..c0ec464 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -726,3 +726,15 @@ then stop_script "chapter8/8.15-tcl.sh" fi +# Chapter 8.16 +# ============ +echo "Building expect" +su -c "bash $SCRIPT/chapter8/8.16-expect.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + exit 1 +fi +