diff --git a/scripts/chapter8/8.57-gawk.sh b/scripts/chapter8/8.57-gawk.sh new file mode 100644 index 0000000..982d691 --- /dev/null +++ b/scripts/chapter8/8.57-gawk.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +cd /sources +tar xf gawk-5.1.1.tar.xz +cd gawk-5.1.1 + +sed -i 's/extras//' Makefile.in +./configure --prefix=/usr + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make check + +make install + +mkdir -pv /usr/share/doc/gawk-5.1.1 +cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.1.1 + +cd /sources +rm -rf gawk-5.1.1 diff --git a/scripts/main.sh b/scripts/main.sh index dcad6b7..b430de9 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -1222,3 +1222,15 @@ then stop_script "chapter8/8.56-diffutils.sh" fi +# Chapter 8.57 +# ============ +echo "Building gawk" +su -c "bash $SCRIPT/chapter8/8.57-gawk.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.57-gawk.sh" +fi +