diff --git a/scripts/chapter8/8.11-readline.sh b/scripts/chapter8/8.11-readline.sh new file mode 100644 index 0000000..3fd3054 --- /dev/null +++ b/scripts/chapter8/8.11-readline.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +cd /sources +tar xf readline-8.1.2.tar.gz +cd readline-8.1.2 + +sed -i '/MV.*old/d' Makefile.in +sed -i '/{OLDSUFF}/c:' support/shlib-install + +./configure --prefix=/usr \ + --disable-static \ + --with-curses \ + --docdir=/usr/share/doc/readline-8.1.2 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make SHLIB_LIBS="-lncursesw" -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make SHLIB_LIBS="-lncursesw" install + +install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-8.1.2 + +cd /sources +rm -rf readline-8.1.2 + diff --git a/scripts/main.sh b/scripts/main.sh index b3749dc..0bd8369 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -666,4 +666,15 @@ then stop_script "chapter8/8.10-file.sh" fi +# Chapter 8.11 +# ============ +echo "Building readline" +su -c "bash $SCRIPT/chapter8/8.11-readline.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.11-readline.sh" +fi