diff options
Diffstat (limited to 'chapter6/cleanup.sh')
-rw-r--r-- | chapter6/cleanup.sh | 17 |
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 |