aboutsummaryrefslogtreecommitdiffstats
path: root/chapter7
diff options
context:
space:
mode:
Diffstat (limited to 'chapter7')
-rw-r--r--chapter7/backup.sh2
-rw-r--r--chapter7/cleanup.sh23
2 files changed, 13 insertions, 12 deletions
diff --git a/chapter7/backup.sh b/chapter7/backup.sh
index a6abb86..7745551 100644
--- a/chapter7/backup.sh
+++ b/chapter7/backup.sh
@@ -9,7 +9,7 @@ else
printf "%b" "${GRN}Backing up ${YLW}${LFS}${GRN} to ${YLW}${file}${RST}... "
pushd "${LFS}" > /dev/null || exit 1
- sudo XZ_OPTS="-T${NUMPROCS} -e" tar cJpf "${HOME}"/"${file}" "${directories[@]}" >/dev/null 2>&1 & pid=$!
+ sudo XZ_OPTS="-T${NUMPROCS} -e" tar cJvpf "${HOME}"/"${file}" "${directories[@]}" >"${LFS}"/sources/log/chapter7/backup.log 2>&1 & pid=$!
spinner "$pid" "${SPINNER}"
retval=$?
if [ "${retval}" -ne 0 ]; then
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