diff --git a/scripts/chapter8/8.79-cleanup.sh b/scripts/chapter8/8.79-cleanup.sh new file mode 100644 index 0000000..4aaf495 --- /dev/null +++ b/scripts/chapter8/8.79-cleanup.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +rm -rf /tmp/* + +find /usr/lib /usr/libexec -name \*.la -delete + +find /usr -depth -name $(uname -m)-lfs-linux-gnu\* | xargs rm -rf + +userdel -r tester + diff --git a/scripts/main.sh b/scripts/main.sh index 43922f2..78a75c9 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -1474,3 +1474,15 @@ then stop_script "chapter8/8.78-stripping.sh" fi +# Chapter 8.79 +# ============ +echo "Cleaning up extra files" +su -c "bash $SCRIPT/chapter8/8.79-cleanup.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter8/8.79-cleanup.sh" +fi +