blob: 9a1e3afecbcaa12c8db3a6b14d7600fef61ce871 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
if [ -f "${LFS}/sources/chapter6/cleanup" ]; then
echo -e "${IYLW}Chapter 6 ${IGRN}cleanup already performed.${RST}"
else
echo -ne "${GRN}Cleaning up ${YLW}${LFS}${RST}... "
find "${LFS}"/usr/lib -name \*.la -delete >/dev/null 2>&1
find "${LFS}"/usr/libexec -name \*.la -delete >/dev/null 2>&1
rm -rf "${LFS}"/usr/share/doc >/dev/null 2>&1
rm -rf "${LFS}"/usr/share/info >/dev/null 2>&1
rm -rf "${LFS}"/usr/share/man >/dev/null 2>&1
strip --strip-debug "${LFS}"/usr/lib/* >/dev/null 2>&1
strip --strip-unneeded "${LFS}"/usr/bin/* >/dev/null 2>&1
strip --strip-unneeded "${LFS}"/usr/sbin/* >/dev/null 2>&1
strip --strip-unneeded "${LFS}"/tools/bin/* >/dev/null 2>&1
echo -e "${GRN}OK${RST}"
touch "${LFS}"/sources/chapter6/cleanup >/dev/null 2>&1
fi
|