From f02486986531dfc178a1d54bfc44caf1c59952f3 Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 11 Jan 2023 11:49:43 +0530 Subject: [PATCH] Add 8.24 - Build libcap --- scripts/chapter8/8.24-libcap.sh | 22 ++++++++++++++++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 scripts/chapter8/8.24-libcap.sh diff --git a/scripts/chapter8/8.24-libcap.sh b/scripts/chapter8/8.24-libcap.sh new file mode 100644 index 0000000..3b90516 --- /dev/null +++ b/scripts/chapter8/8.24-libcap.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +cd /sources +tar xf libcap-2.65.tar.xz +cd libcap-2.65 + +sed -i '/install -m.*STA/d' libcap/Makefile + +make prefix=/usr lib=lib + +if [ $? -ne 0 ] +then + exit 1 +fi + +make test + +make prefix=/usr lib=lib install + +cd /sources +rm -rf libcap-2.65 + diff --git a/scripts/main.sh b/scripts/main.sh index 7576146..7ea0151 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -822,3 +822,15 @@ then stop_script "chapter8/8.23-acl.sh" fi +# Chapter 8.24 +# ============ +echo "Building libcap" +su -c "bash $SCRIPT/chapter8/8.24-libcap.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.24-libcap.sh" +fi +