mirror of
https://github.com/superconvert/smart-os.git
synced 2024-11-22 18:20:30 +08:00
49 lines
853 B
Bash
Executable File
49 lines
853 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# 导入公共环境
|
|
. ./common.sh
|
|
|
|
strip_dir() {
|
|
for file in `ls $1`
|
|
do
|
|
if [ -d $1"/"$file ]; then
|
|
strip_dir $1"/"$file
|
|
else
|
|
if [ -x $1"/"$file ]; then
|
|
case "$file" in
|
|
*.a);;
|
|
*.la);;
|
|
*)strip $1"/"$file; continue;;
|
|
esac
|
|
fi
|
|
case "$file" in
|
|
*.a) strip -g -S -d $1"/"$file;;
|
|
*.so) strip $1"/"$file;;
|
|
*.so.*) strip $1"/"$file;;
|
|
*);;
|
|
esac
|
|
fi
|
|
done
|
|
}
|
|
|
|
# strip glibc
|
|
rm -rf ${glibc_install}/usr/share
|
|
strip_dir ${glibc_install}
|
|
|
|
# strip busybox
|
|
rm -rf ${busybox_install}/linuxrc
|
|
strip ${busybox_install}/bin/busybox
|
|
|
|
# strip gcc
|
|
#rm -rf work/libgcc_install/usr/share
|
|
strip_dir ${gcc_install}
|
|
|
|
# strip binutils
|
|
#rm -rf work/binutils_install/usr/share
|
|
strip_dir ${binutils_install}
|
|
|
|
# strip xfce
|
|
if [ "${with_xfce}" = true ]; then
|
|
strip_dir ${xfce_install}
|
|
fi
|