From e4487709ac27d80179c2a685b91ed023ca178021 Mon Sep 17 00:00:00 2001
From: William Harrington <kb0iic@berzerkula.org>
Date: Tue, 23 Mar 2021 13:14:12 -0500
Subject: Clean up chapter6 scripts.

---
 chapter6/ncurses.sh | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

(limited to 'chapter6/ncurses.sh')

diff --git a/chapter6/ncurses.sh b/chapter6/ncurses.sh
index 91ffa45..6320a9f 100644
--- a/chapter6/ncurses.sh
+++ b/chapter6/ncurses.sh
@@ -1,15 +1,17 @@
+#!/bin/bash
+
 sed -i s/mawk// configure &&
 
 mkdir build
-pushd build > /dev/null
+pushd build > /dev/null || exit 1
     ../configure &&
     make -C include &&
     make -C progs tic &&
-popd > /dev/null
+popd > /dev/null || exit 1
 
 ./configure --prefix=/usr \
-            --host=${LFS_TGT} \
-            --build=$(./config.guess) \
+            --host="${LFS_TGT}" \
+            --build="$(./config.guess)" \
             --mandir=/usr/share/man \
             --with-manpage-format=normal \
             --with-shared \
@@ -18,7 +20,7 @@ popd > /dev/null
             --without-normal \
             --enable-widec &&
 make &&
-make DESTDIR=${LFS} TIC_PATH=$(pwd)/build/progs/tic -j1 install &&
-echo "INPUT(-lncursesw)" > ${LFS}/usr/lib/libncurses.so &&
-mv -v ${LFS}/usr/lib/libncursesw.so.6* ${LFS}/lib &&
-ln -sfv ../../lib/$(readlink ${LFS}/usr/lib/libncursesw.so) ${LFS}/usr/lib/libncursesw.so
+make DESTDIR="${LFS}" TIC_PATH="$(pwd)"/build/progs/tic -j1 install &&
+echo "INPUT(-lncursesw)" > "${LFS}"/usr/lib/libncurses.so &&
+mv -v "${LFS}"/usr/lib/libncursesw.so.6* "${LFS}"/lib &&
+ln -sfv ../../lib/"$(readlink "${LFS}"/usr/lib/libncursesw.so)" "${LFS}"/usr/lib/libncursesw.so
-- 
cgit v1.2.3-54-g00ecf