-
Notifications
You must be signed in to change notification settings - Fork 4
/
mk_strip.sh
executable file
·67 lines (54 loc) · 1.13 KB
/
mk_strip.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
# 导入公共环境
. ./common.sh
# 对指定的目录进行 strip
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_dir ${busybox_install}/bin/busybox
# strip lshw
strip_dir ${lshw_install}
# strip pciutils_install
strip_dir ${pciutils_install}
# strip lsof
strip_dir ${lsof_install}
# strip strace
strip_dir ${strace_install}
# strip openssl
strip_dir ${openssl_install}
# strip openssh
strip_dir ${openssh_install}
# 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