Replaced /bin/sh by /bin/bash
[hvlinux.git] / stage2 / cis-readline
index 13273f6..cf28d22 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/sh
+#!/bin/bash
+set -o errexit
+
 # First argument of this script is the package name
 
 # Reading system configuration informations, functions and package versions.
@@ -7,31 +9,30 @@ source ../functions
 source ../packages-list
 
 # Applying patches (if any)
-apply_patches ${1} &&
+apply_patches ${1}
 
-cd ${LFS_TMP}/${1} &&
+cd ${LFS_TMP}/${1}
 
 # Reinstalling Readline will cause the old libraries to be moved to
 # <libraryname>.old. While this is normally not a problem, in some
 # cases it can trigger a linking bug in ldconfig. This can be
 # avoided by issuing the following two seds:
-sed -i '/MV.*old/d' Makefile.in &&
-sed -i '/{OLDSUFF}/c:' support/shlib-install &&
+sed -i '/MV.*old/d' Makefile.in
+sed -i '/{OLDSUFF}/c:' support/shlib-install
 
-cd ${LFS_TMP}/${1}-build &&
+cd ${LFS_TMP}/${1}-build
 ../${1}/configure \
     --prefix=/usr \
-    --libdir=/lib &&
+    --libdir=/lib
 # SHLIB_LIBS=-lncurses: Forces Readline to link against the libncurses library.
-make SHLIB_LIBS=-lncurses &&
-make install &&
+make SHLIB_LIBS=-lncurses
+make install
 # Now move the static libraries to a more appropriate location:
-mv -v /lib/lib{readline,history}.a /usr/lib &&
+mv -v /lib/lib{readline,history}.a /usr/lib
 
 # Next, remove the .so files in /lib and relink them into /usr/lib:
-rm -v /lib/lib{readline,history}.so &&
-ln -sfv ../../lib/libreadline.so.5 /usr/lib/libreadline.so &&
-ln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.so
+rm -v /lib/lib{readline,history}.so
+ln -sfv ../../lib/libreadline.so.6 /usr/lib/libreadline.so
+ln -sfv ../../lib/libhistory.so.6 /usr/lib/libhistory.so
 
-# Return last error
 exit $?