aboutsummaryrefslogtreecommitdiffstats
path: root/chapter7/cleanup.sh
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-05 20:28:05 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-05 20:28:05 -0500
commit56dbd9d14e01fc4e4d4987a047f952ffa57f7777 (patch)
treec948160876b538781d5b1e6cbe7ba04a797268ef /chapter7/cleanup.sh
parent0aa6a71f970f258691719ca986b84104d042d82c (diff)
Make tar command verbose and log to backup and cleanup logs.
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