aboutsummaryrefslogtreecommitdiffstats
path: root/chapter7/cleanup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chapter7/cleanup.sh')
-rw-r--r--chapter7/cleanup.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/chapter7/cleanup.sh b/chapter7/cleanup.sh
index 93e8a88..921981b 100644
--- a/chapter7/cleanup.sh
+++ b/chapter7/cleanup.sh
@@ -6,19 +6,20 @@ else
printf "%b" "${GRN}Cleaning up ${YLW}${LFS}${RST}... "
- sudo find "${LFS}"/usr/lib -name \*.la -delete >/dev/null 2>&1
- sudo find "${LFS}"/usr/libexec -name \*.la -delete >/dev/null 2>&1
+ {
+ sudo find "${LFS}"/usr/lib -name \*.la -delete
+ sudo find "${LFS}"/usr/libexec -name \*.la -delete
- sudo rm -rf "${LFS}"/usr/share/doc >/dev/null 2>&1
- sudo rm -rf "${LFS}"/usr/share/info >/dev/null 2>&1
- sudo rm -rf "${LFS}"/usr/share/man >/dev/null 2>&1
+ sudo rm -rfv "${LFS}"/usr/share/doc
+ sudo rm -rfv "${LFS}"/usr/share/info
+ sudo rm -rfv "${LFS}"/usr/share/man
- #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
+ sudo strip --strip-debug "${LFS}"/usr/lib/* || true
+ sudo strip --strip-unneeded "${LFS}"/usr/bin/* || true
+ sudo strip --strip-unneeded "${LFS}"/usr/sbin/* || true
+ sudo strip --strip-unneeded "${LFS}"/tools/bin/* || true
+} >"${LFS}"/sources/log/chapter7/cleanup.log 2>&1
printf "%b" "${IGRN}OK${RST}\n"
- touch "${LFS}"/sources/chapter7/cleanup >/dev/null 2>&1
+ sudo touch "${LFS}"/sources/chapter7/cleanup >/dev/null 2>&1
fi