-#!/bin/sh
+#!/bin/bash
+set -o errexit
+
# First argument of this script is the package name
# Reading system configuration informations, functions and package versions.
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
chmod -v 755 /usr/bin/lex
# Return last error
-exit ${last_error}
+exit ${?}