From a6f0776a6b5fed9192fc7bc092e91b36c622bf46 Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 10 Jan 2023 15:12:09 +0530 Subject: [PATCH] Add 8.9 - Build ztsd --- scripts/chapter8/8.9-zstd.sh | 24 ++++++++++++++++++++++++ scripts/main.sh | 11 +++++++++++ 2 files changed, 35 insertions(+) create mode 100644 scripts/chapter8/8.9-zstd.sh diff --git a/scripts/chapter8/8.9-zstd.sh b/scripts/chapter8/8.9-zstd.sh new file mode 100644 index 0000000..8fdf1a0 --- /dev/null +++ b/scripts/chapter8/8.9-zstd.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +cd /sources +tar xf zstd-1.5.2.tar.gz +cd zstd-1.5.2 + +patch -Np1 -i ../zstd-1.5.2-upstream_fixes-1.patch + +make -j5 prefix=/usr + +if [ $? -ne 0 ] +then + exit 1 +fi + +make check + +make prefix=/usr install + +rm -v /usr/lib/libzstd.a + +cd /sources +rm -rf zstd-1.5.2 + diff --git a/scripts/main.sh b/scripts/main.sh index f7549a6..b253a9b 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -642,4 +642,15 @@ then stop_script "chapter8/8.8-xz.sh" fi +# Chapter 8.9 +# =========== +echo "Building zstd" +su -c "bash $SCRIPT/chapter8/8.9-zstd.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.9-zstd.sh" +fi