diff --git a/scripts/chapter8/8.6-zlib.sh b/scripts/chapter8/8.6-zlib.sh new file mode 100644 index 0000000..912ccc7 --- /dev/null +++ b/scripts/chapter8/8.6-zlib.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +cd /sources +tar xf zlib-1.2.12.tar.xz +cd zlib-1.2.12 + +./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/libz.a + +cd /sources +rm -rf zlib-1.2.12 + diff --git a/scripts/main.sh b/scripts/main.sh index 924e0fa..a4d6041 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -606,4 +606,15 @@ then stop_script "chapter8/8.5-glibc.sh" fi +# Chapter 8.6 +# =========== +echo "Building zlib" +su -c "bash $SCRIPT/chapter8/8.6-zlib.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.6-zlib.sh" +fi