Files
SimpleLinux/scripts/cleanup_rootfs.sh
T
2026-02-26 13:40:18 +07:00

24 lines
680 B
Bash
Executable File

#!/bin/bash
set -x
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
cleanup_rootfs() {
if [ "${TCC_C_COMPILER_ENABLE}" = "n" ]; then
find $rootfspath -type f -name "*.a" -delete
find $rootfspath -type f -name "*.la" -delete
rm -rv $rootfspath/usr/include
rm -rv $rootfspath/usr/share/man
rm -rv $rootfspath/usr/lib/pkgconfig
fi
STRIP_FILES=$(file --mime-type $(find $rootfspath -type f) | grep "application/x-executable\|application/x-sharedlib\|application/x-pie-executable" | sed 's/:.*$//')
# echo $STRIP_FILES
for i in $STRIP_FILES; do
${CROSS_COMPILE}-strip $i
echo $i
done
}