aboutsummaryrefslogtreecommitdiffstats
path: root/chapter6
diff options
context:
space:
mode:
Diffstat (limited to 'chapter6')
-rw-r--r--chapter6/cleanup.sh9
-rw-r--r--chapter6/file.sh4
-rw-r--r--chapter6/gcc.sh8
3 files changed, 11 insertions, 10 deletions
diff --git a/chapter6/cleanup.sh b/chapter6/cleanup.sh
index 5f6e327..2266d06 100644
--- a/chapter6/cleanup.sh
+++ b/chapter6/cleanup.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
if [ -f "${LFS}/sources/chapter6/cleanup" ]; then
printf "%b" " ${IGRN}Cleanup already performed${RST}\n"
@@ -14,10 +15,10 @@ else
rm -rfv "${LFS}"/usr/share/info
rm -rfv "${LFS}"/usr/share/man
- strip --strip-debug "${LFS}"/usr/lib/*
- strip --strip-unneeded "${LFS}"/usr/bin/*
- strip --strip-unneeded "${LFS}"/usr/sbin/*
- strip --strip-unneeded "${LFS}"/tools/bin/*
+ strip --strip-debug "${LFS}"/usr/lib/* || true
+ strip --strip-unneeded "${LFS}"/usr/bin/* || true
+ strip --strip-unneeded "${LFS}"/usr/sbin/* || true
+ strip --strip-unneeded "${LFS}"/tools/bin/* || true
} >"${LFS}"/sources/log/chapter6/cleanup.log 2>&1
diff --git a/chapter6/file.sh b/chapter6/file.sh
index 69c17d8..6d39e77 100644
--- a/chapter6/file.sh
+++ b/chapter6/file.sh
@@ -15,7 +15,7 @@ popd > /dev/null || exit 1
--host="${LFS_TGT}" \
--build="$(./config.guess)" &&
make FILE_COMPILE="$(pwd)"/build/src/file &&
-make DESTDIR="${LFS}" -j1 install
+make DESTDIR="${LFS}" -j1 install &&
-mv -v "${LFS}"/usr/lib/libmagic.so.* "${LFS}"/lib
+mv -v "${LFS}"/usr/lib/libmagic.so.* "${LFS}"/lib &&
ln -sfv ../../lib/"$(readlink /usr/lib/libmagic.so)" "${LFS}"/usr/lib/libmagic.so
diff --git a/chapter6/gcc.sh b/chapter6/gcc.sh
index 7806d3a..020649e 100644
--- a/chapter6/gcc.sh
+++ b/chapter6/gcc.sh
@@ -2,10 +2,10 @@
set -e
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
-tar -xf ../gmp-*.tar.xz -C gmp --strip-components=1
-tar -xf ../mpc-*.tar.gz -C mpc --strip-components=1
+tar -xf ../isl-*.tar.xz -C isl --strip-components=1 &&
+tar -xf ../mpfr-*.tar.xz -C mpfr --strip-components=1 &&
+tar -xf ../gmp-*.tar.xz -C gmp --strip-components=1 &&
+tar -xf ../mpc-*.tar.gz -C mpc --strip-components=1 &&
case $(uname -m) in
x86_64)