aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-14 16:36:54 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-14 16:36:54 -0500
commite5cb063449df5491af4861744b80c6ea40e7cac3 (patch)
treee8b8c3a0b2942916f693ba99e20848e96ead15a5
parentd6256469f03da08c897a09ab03806b9dd34dab59 (diff)
Use set -e
-rw-r--r--chapter6/cleanup.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/chapter6/cleanup.sh b/chapter6/cleanup.sh
index 0eb80a2..748c0cc 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"
@@ -8,16 +9,16 @@ else
{
find "${LFS}"/usr/lib -name \*.la -delete
- find "${LFS}"/usr/libexec -name \*.la -delete
+ find "${LFS}"/usr/libexec -name \*.la -delete
- rm -rfv "${LFS}"/usr/share/doc
- rm -rfv "${LFS}"/usr/share/info
- rm -rfv "${LFS}"/usr/share/man
+ rm -rfv "${LFS}"/usr/share/doc
+ 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