aboutsummaryrefslogtreecommitdiffstats
path: root/chapter7/cleanup.sh
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-05 14:01:56 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-05 14:01:56 -0500
commit95106e41d0abc92a05384092c93f266dbd1bd9e7 (patch)
tree494fe70c951365d5681bbbc541fe094dbd7eb2a7 /chapter7/cleanup.sh
parent2d6c50cadac6a03f8b57e92c3bc2f7988d0ae6a6 (diff)
Create directories and essential files outside of chroot. Then chroot. When stripping, exit status is not 0 when strip finds uknown formats. Just return true. Make createdirs, umountvirtfs and essential files as separate scripts.
Diffstat (limited to 'chapter7/cleanup.sh')
-rw-r--r--chapter7/cleanup.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/chapter7/cleanup.sh b/chapter7/cleanup.sh
index 0a5ec86..93e8a88 100644
--- a/chapter7/cleanup.sh
+++ b/chapter7/cleanup.sh
@@ -13,10 +13,11 @@ else
sudo rm -rf "${LFS}"/usr/share/info >/dev/null 2>&1
sudo rm -rf "${LFS}"/usr/share/man >/dev/null 2>&1
- sudo strip --strip-debug "${LFS}"/usr/lib/* >/dev/null 2>&1
- sudo strip --strip-unneeded "${LFS}"/usr/bin/* >/dev/null 2>&1
- sudo strip --strip-unneeded "${LFS}"/usr/sbin/* >/dev/null 2>&1
- sudo strip --strip-unneeded "${LFS}"/tools/bin/* >/dev/null 2>&1
+ #find "${LFS}"/usr/lib -type f -executable -print | xargs sudo strip --strip-debug
+ sudo strip --strip-debug "${LFS}"/usr/lib/* >/dev/null 2>&1 || true
+ sudo strip --strip-unneeded "${LFS}"/usr/bin/* >/dev/null 2>&1 || true
+ sudo strip --strip-unneeded "${LFS}"/usr/sbin/* >/dev/null 2>&1 || true
+ sudo strip --strip-unneeded "${LFS}"/tools/bin/* >/dev/null 2>&1 || true
printf "%b" "${IGRN}OK${RST}\n"
touch "${LFS}"/sources/chapter7/cleanup >/dev/null 2>&1