Replaced /bin/sh by /bin/bash
[hvlinux.git] / stage2 / cis-flex
index 449a627..ff5ae38 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,18 +9,18 @@ source ../functions
 source ../packages-list
 
 # Applying patches (if any)
-apply_patches ${1} &&
+apply_patches ${1}
 
-cd ${LFS_TMP}/${1}-build &&
+cd ${LFS_TMP}/${1}-build
 ../${1}/configure \
-    --prefix=/usr &&
-make -j ${MAKEJOBS} &&
-make install &&
+    --prefix=/usr
+make -j ${MAKEJOBS}
+make install
 
-ln -sfv libfl.a /usr/lib/libl.a &&
+ln -sfv libfl.a /usr/lib/libl.a
 
 # Create a bash script called lex that calls flex and have it emulate lex.
-cat > /usr/bin/lex << "EOF" &&
+cat > /usr/bin/lex << "EOF"
 #!/bin/sh
 # /usr/bin/lex
 
@@ -27,4 +29,4 @@ EOF
 chmod -v 755 /usr/bin/lex
 
 # Return last error
-exit ${last_error}
+exit ${?}