diff options
Diffstat (limited to 'chapter6/cleanup.sh')
-rw-r--r-- | chapter6/cleanup.sh | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/chapter6/cleanup.sh b/chapter6/cleanup.sh index 2266d06..5c56319 100644 --- a/chapter6/cleanup.sh +++ b/chapter6/cleanup.sh @@ -1,27 +1,27 @@ -#!/bin/bash -set -e - -if [ -f "${LFS}/sources/chapter6/cleanup" ]; then - printf "%b" " ${IGRN}Cleanup already performed${RST}\n" -else - - printf "%b" "${GRN}Cleaning up ${YLW}${LFS}${RST}... " - - { - find "${LFS}"/usr/lib -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 - - 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 - - success "OK" - touch "${LFS}"/sources/chapter6/cleanup -fi +#!/bin/bash
+set -e
+
+if [ -f "${LFS}/sources/chapter6/cleanup" ]; then
+ printf "%b" " ${IGRN}Cleanup already performed${RST}\n"
+else
+
+ printf "%b" "${GRN}Cleaning up ${YLW}${LFS}${RST}... "
+
+ {
+ find "${LFS}"/usr/lib -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
+
+ 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
+
+ success "OK"
+ touch "${LFS}"/sources/chapter6/cleanup
+fi
|