From b1f251d70bb4c7c860f1f1e550db872e686475b9 Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 12 Jan 2023 11:37:15 +0530 Subject: [PATCH] Add 8.40 - Build less --- scripts/chapter8/8.40-less.sh | 24 ++++++++++++++++++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 scripts/chapter8/8.40-less.sh diff --git a/scripts/chapter8/8.40-less.sh b/scripts/chapter8/8.40-less.sh new file mode 100644 index 0000000..b156579 --- /dev/null +++ b/scripts/chapter8/8.40-less.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +cd /sources +tar xf less-590.tar.gz +cd less-590 + +./configure --prefix=/usr --sysconfdir=/etc + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make install + +cd /sources +rm -rf less-590 diff --git a/scripts/main.sh b/scripts/main.sh index 10c8e73..ec50e92 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -1019,3 +1019,15 @@ then stop_script "chapter8/8.39-inetutils.sh" fi +# Chapter 8.40 +# ============ +echo "Building less" +su -c "bash $SCRIPT/chapter8/8.40-less.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.40-less.sh" +fi +