aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chapter5/binutils.sh4
-rw-r--r--chapter5/gcc.sh4
-rw-r--r--chapter5/glibc.sh2
-rw-r--r--chapter5/libstdc++.sh4
-rw-r--r--chapter5/linux-api-headers.sh4
-rw-r--r--chapter6/bash.sh4
-rw-r--r--chapter6/binutils.sh4
-rw-r--r--chapter6/coreutils.sh4
-rw-r--r--chapter6/diffutils.sh2
-rw-r--r--chapter6/file.sh4
-rw-r--r--chapter6/findutils.sh4
-rw-r--r--chapter6/gawk.sh4
-rw-r--r--chapter6/gcc.sh2
-rw-r--r--chapter6/grep.sh4
-rw-r--r--chapter6/gzip.sh4
-rw-r--r--chapter6/m4.sh2
-rw-r--r--chapter6/make.sh4
-rw-r--r--chapter6/ncurses.sh4
-rw-r--r--chapter6/patch.sh4
-rw-r--r--chapter6/sed.sh4
-rw-r--r--chapter6/tar.sh4
-rw-r--r--chapter6/xz.sh4
-rw-r--r--colors.sh4
-rw-r--r--[-rwxr-xr-x]download.sh2
-rw-r--r--env.sh10
-rw-r--r--packageinstall.sh4
-rw-r--r--[-rwxr-xr-x]setupdisk.sh2
-rw-r--r--spinner.sh4
28 files changed, 27 insertions, 79 deletions
diff --git a/chapter5/binutils.sh b/chapter5/binutils.sh
index 68da871..c77a576 100644
--- a/chapter5/binutils.sh
+++ b/chapter5/binutils.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
mkdir build
cd build
@@ -9,4 +7,4 @@ cd build
--disable-nls \
--disable-werror &&
make &&
-make -j1 install \ No newline at end of file
+make -j1 install
diff --git a/chapter5/gcc.sh b/chapter5/gcc.sh
index c5404d1..6ef4ac6 100644
--- a/chapter5/gcc.sh
+++ b/chapter5/gcc.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
mkdir -p mpfr gmp mpc
tar -xf ../mpfr-*.tar.xz -C mpfr --strip-components=1
tar -xf ../gmp-*.tar.xz -C gmp --strip-components=1
@@ -41,4 +39,4 @@ make -j1 install &&
cd ..
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
- `dirname $(${LFS_TGT}-gcc -print-libgcc-file-name)`/install-tools/include/limits.h \ No newline at end of file
+ `dirname $(${LFS_TGT}-gcc -print-libgcc-file-name)`/install-tools/include/limits.h
diff --git a/chapter5/glibc.sh b/chapter5/glibc.sh
index 38e7ebc..875e633 100644
--- a/chapter5/glibc.sh
+++ b/chapter5/glibc.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
case $(uname -m) in
i?86) ln -sfv ld-linux.so.2 ${LFS}/lib/ld-lsb.so.3
;;
diff --git a/chapter5/libstdc++.sh b/chapter5/libstdc++.sh
index 73380a8..1e21f35 100644
--- a/chapter5/libstdc++.sh
+++ b/chapter5/libstdc++.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
mkdir -v build
cd build
@@ -13,4 +11,4 @@ cd build
--with-gxx-include-dir=/tools/${LFS_TGT}/include/c++/${VERSION} &&
make &&
-make -j1 DESTDIR=${LFS} install \ No newline at end of file
+make -j1 DESTDIR=${LFS} install
diff --git a/chapter5/linux-api-headers.sh b/chapter5/linux-api-headers.sh
index 30383a8..3de6e81 100644
--- a/chapter5/linux-api-headers.sh
+++ b/chapter5/linux-api-headers.sh
@@ -1,7 +1,5 @@
-#!/bin/bash
-
make mrproper &&
make headers &&
find usr/include -name '.*' -delete &&
rm usr/include/Makefile &&
-cp -rv usr/include ${LFS}/usr \ No newline at end of file
+cp -rv usr/include ${LFS}/usr
diff --git a/chapter6/bash.sh b/chapter6/bash.sh
index c255260..83a7a89 100644
--- a/chapter6/bash.sh
+++ b/chapter6/bash.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
./configure --prefix=/usr \
--build=$(support/config.guess) \
--host=${LFS_TGT} \
@@ -7,4 +5,4 @@
make &&
make DESTDIR=${LFS} -j1 install &&
mv ${LFS}/usr/bin/bash ${LFS}/bin/bash &&
-ln -sv bash ${LFS}/bin/sh \ No newline at end of file
+ln -sv bash ${LFS}/bin/sh
diff --git a/chapter6/binutils.sh b/chapter6/binutils.sh
index b04f731..5411f57 100644
--- a/chapter6/binutils.sh
+++ b/chapter6/binutils.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
mkdir -v build
cd build
@@ -13,4 +11,4 @@ cd build
--enable-64-bit-bfd &&
make &&
make DESTDIR=${LFS} -j1 install &&
-install -vm755 libctf/.libs/libctf.so.0.0.0 ${LFS}/usr/lib \ No newline at end of file
+install -vm755 libctf/.libs/libctf.so.0.0.0 ${LFS}/usr/lib
diff --git a/chapter6/coreutils.sh b/chapter6/coreutils.sh
index 3d221b4..b9d5079 100644
--- a/chapter6/coreutils.sh
+++ b/chapter6/coreutils.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
./configure --prefix=/usr \
--host=${LFS_TGT} \
--build=$(build-aux/config.guess) \
@@ -14,4 +12,4 @@ mv -v ${LFS}/usr/bin/{head,nice,sleep,touch} ${LFS}/bin &&
mv -v ${LFS}/usr/bin/chroot ${LFS}/usr/sbin &&
mkdir -pv ${LFS}/usr/share/man/man8 &&
mv -v ${LFS}/usr/share/man/man1/chroot.1 ${LFS}/usr/share/man/man8/chroot.8 &&
-sed -i 's/"1"/"8"/' ${LFS}/usr/share/man/man8/chroot.8 \ No newline at end of file
+sed -i 's/"1"/"8"/' ${LFS}/usr/share/man/man8/chroot.8
diff --git a/chapter6/diffutils.sh b/chapter6/diffutils.sh
index aa4ddb8..1e20581 100644
--- a/chapter6/diffutils.sh
+++ b/chapter6/diffutils.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
sed 's/help2man -i/help2man --no-discard-stderr -i /' -i man/Makefile.in
HELP2MAN="help2man --no-discard-stderr" ./configure --prefix=/usr --host=${LFS_TGT} &&
make &&
diff --git a/chapter6/file.sh b/chapter6/file.sh
index bb13927..e2697a9 100644
--- a/chapter6/file.sh
+++ b/chapter6/file.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
mkdir build
pushd build > /dev/null
@@ -12,4 +10,4 @@ popd > /dev/null
./configure --prefix=/usr --host=${LFS_TGT} --build=$(./config.guess) &&
make FILE_COMPILE=$(pwd)/build/src/file &&
-make DESTDIR=${LFS} -j1 install \ No newline at end of file
+make DESTDIR=${LFS} -j1 install
diff --git a/chapter6/findutils.sh b/chapter6/findutils.sh
index a1a097e..b587638 100644
--- a/chapter6/findutils.sh
+++ b/chapter6/findutils.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
./configure --prefix=/usr \
--host=${LFS_TGT} \
--build=$(build-aux/config.guess) &&
@@ -7,4 +5,4 @@ make &&
make DESTDIR=${LFS} -j1 install &&
mv -v ${LFS}/usr/bin/find ${LFS}/bin &&
-sed -i 's|find:=${BINDIR}|find:=/bin|' ${LFS}/usr/bin/updatedb \ No newline at end of file
+sed -i 's|find:=${BINDIR}|find:=/bin|' ${LFS}/usr/bin/updatedb
diff --git a/chapter6/gawk.sh b/chapter6/gawk.sh
index b56e565..5d2fd68 100644
--- a/chapter6/gawk.sh
+++ b/chapter6/gawk.sh
@@ -1,8 +1,6 @@
-#!/bin/bash
-
sed -i 's/extras//' Makefile.in &&
./configure --prefix=/usr \
--host=${LFS_TGT} \
--build=$(./config.guess) &&
make &&
-make DESTDIR=${LFS} -j1 install \ No newline at end of file
+make DESTDIR=${LFS} -j1 install
diff --git a/chapter6/gcc.sh b/chapter6/gcc.sh
index d13ef9f..adf4593 100644
--- a/chapter6/gcc.sh
+++ b/chapter6/gcc.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
mkdir -p isl mpfr gmp mpc
tar -xf ../isl-*.tar.xz -C isl --strip-components=1
tar -xf ../mpfr-*.tar.xz -C mpfr --strip-components=1
diff --git a/chapter6/grep.sh b/chapter6/grep.sh
index 8d7d8a5..a768e19 100644
--- a/chapter6/grep.sh
+++ b/chapter6/grep.sh
@@ -1,7 +1,5 @@
-#!/bin/bash
-
./configure --prefix=/usr \
--host=${LFS_TGT} \
--bindir=/bin &&
make &&
-make DESTDIR=${LFS} -j1 install \ No newline at end of file
+make DESTDIR=${LFS} -j1 install
diff --git a/chapter6/gzip.sh b/chapter6/gzip.sh
index 6775502..853ed7b 100644
--- a/chapter6/gzip.sh
+++ b/chapter6/gzip.sh
@@ -1,6 +1,4 @@
-#!/bin/bash
-
./configure --prefix=/usr --host=${LFS_TGT} &&
make &&
make DESTDIR=${LFS} -j1 install &&
-mv -v ${LFS}/usr/bin/gzip ${LFS}/bin \ No newline at end of file
+mv -v ${LFS}/usr/bin/gzip ${LFS}/bin
diff --git a/chapter6/m4.sh b/chapter6/m4.sh
index 5949e11..04ffbcc 100644
--- a/chapter6/m4.sh
+++ b/chapter6/m4.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c &&
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h &&
diff --git a/chapter6/make.sh b/chapter6/make.sh
index 805e61d..69c7e72 100644
--- a/chapter6/make.sh
+++ b/chapter6/make.sh
@@ -1,8 +1,6 @@
-#!/bin/bash
-
./configure --prefix=/usr \
--without-guile \
--host=${LFS_TGT} \
--build=$(build-aux/config.guess)
make &&
-make DESTDIR=${LFS} -j1 install \ No newline at end of file
+make DESTDIR=${LFS} -j1 install
diff --git a/chapter6/ncurses.sh b/chapter6/ncurses.sh
index b2721d3..91ffa45 100644
--- a/chapter6/ncurses.sh
+++ b/chapter6/ncurses.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
sed -i s/mawk// configure &&
mkdir build
@@ -23,4 +21,4 @@ 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 \ No newline at end of file
+ln -sfv ../../lib/$(readlink ${LFS}/usr/lib/libncursesw.so) ${LFS}/usr/lib/libncursesw.so
diff --git a/chapter6/patch.sh b/chapter6/patch.sh
index 128fa9f..55e45aa 100644
--- a/chapter6/patch.sh
+++ b/chapter6/patch.sh
@@ -1,7 +1,5 @@
-#!/bin/bash
-
./configure --prefix=/usr \
--host=${LFS_TGT} \
--build=$(build-aux/config.guess) &&
make &&
-make DESTDIR=${LFS} -j1 install \ No newline at end of file
+make DESTDIR=${LFS} -j1 install
diff --git a/chapter6/sed.sh b/chapter6/sed.sh
index 8d7d8a5..a768e19 100644
--- a/chapter6/sed.sh
+++ b/chapter6/sed.sh
@@ -1,7 +1,5 @@
-#!/bin/bash
-
./configure --prefix=/usr \
--host=${LFS_TGT} \
--bindir=/bin &&
make &&
-make DESTDIR=${LFS} -j1 install \ No newline at end of file
+make DESTDIR=${LFS} -j1 install
diff --git a/chapter6/tar.sh b/chapter6/tar.sh
index 1526a63..1c32e33 100644
--- a/chapter6/tar.sh
+++ b/chapter6/tar.sh
@@ -1,8 +1,6 @@
-#!/bin/bash
-
./configure --prefix=/usr \
--host=${LFS_TGT} \
--build=$(build-aux/config.guess) \
--bindir=/bin &&
make &&
-make DESTDIR=${LFS} -j1 install \ No newline at end of file
+make DESTDIR=${LFS} -j1 install
diff --git a/chapter6/xz.sh b/chapter6/xz.sh
index 64832ad..7515350 100644
--- a/chapter6/xz.sh
+++ b/chapter6/xz.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
./configure --prefix=/usr \
--host=${LFS_TGT} \
--build=$(build-aux/config.guess) \
@@ -9,4 +7,4 @@ make &&
make DESTDIR=${LFS} -j1 install
mv -v ${LFS}/usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} ${LFS}/bin &&
mv -v ${LFS}/usr/lib/liblzma.so.* ${LFS}/lib &&
-ln -svf ../../lib/$(readlink ${LFS}/usr/lib/liblzma.so) ${LFS}/usr/lib/liblzma.so \ No newline at end of file
+ln -svf ../../lib/$(readlink ${LFS}/usr/lib/liblzma.so) ${LFS}/usr/lib/liblzma.so
diff --git a/colors.sh b/colors.sh
index c92c528..29c3735 100644
--- a/colors.sh
+++ b/colors.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
BLK="\e[0;30m"
RED="\e[0;31m"
GRN="\e[0;32m"
@@ -9,4 +7,4 @@ PRP="\e[0;35m"
CYN="\e[0;36m"
WHT="\e[0;37m"
-RST="\e[0m" \ No newline at end of file
+RST="\e[0m"
diff --git a/download.sh b/download.sh
index b8a0c11..7fd9d47 100755..100644
--- a/download.sh
+++ b/download.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
# Packages
download()
diff --git a/env.sh b/env.sh
index 515995d..a2eab0b 100644
--- a/env.sh
+++ b/env.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
# Begin book environment settings
export PS1='\u:\w\$ '
set +h
@@ -15,7 +13,7 @@ export CONFIG_SITE=${LFS}/usr/share/config.site
# End book environment settings
# LFS Version being built
-export LFS_VER=LFS10_1
+export LFS_VER=LFS_10_1
# Disk where LFS partition will exist / or exists
export LFS_DISK=/dev/sdb
@@ -29,5 +27,9 @@ export LFS_PWD=lfs
# Sources directory for LFS
export LFS_SRC=${LFS}/sources
+# Get number of online processors
+export NUMPROCS=$(getconf _NPROCESSORS_ONLN)
+numjobs=$(expr ${NUMPROCS} \* 2 - 1)
+
# Make flags for multiple jobs
-export MAKEFLAGS="-j 3" \ No newline at end of file
+export MAKEFLAGS="-j ${numjobs}"
diff --git a/packageinstall.sh b/packageinstall.sh
index ce5a42b..03e96b9 100644
--- a/packageinstall.sh
+++ b/packageinstall.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
CHAPTER="$1"
PACKAGE="$2"
@@ -48,4 +46,4 @@ else
popd > /dev/null
done
-fi \ No newline at end of file
+fi
diff --git a/setupdisk.sh b/setupdisk.sh
index 8e2f957..3d33d70 100755..100644
--- a/setupdisk.sh
+++ b/setupdisk.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
LFS_DISK="$1"
LFS_ROOT="$2"
diff --git a/spinner.sh b/spinner.sh
index 525bd9f..91b9649 100644
--- a/spinner.sh
+++ b/spinner.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
## spinner takes the pid of the process as the first argument and
# string to display as second argument (default provided) and spins
# until the process completes.
@@ -44,4 +42,4 @@ spinner() {
return $retval
}
-export -f spinner \ No newline at end of file
+export -f spinner