blob: 1cfab2db21c38ef1880cd5cbce67b6a283789c74 (
plain)
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
|
#! /bin/sh
image_dir=$1
export_dir=$2
strip_tool=$3
if [ -z "$image_dir" -o -z "$export_dir" ] ; then
echo "Usage: $0 <image_dir> <export_dir> [<strip_tool>]"
exit 0
fi
if [ -z "$strip_tool" ] ; then
strip_tool=`which strip`
fi
logfile=`basename $0 .sh`.log
this_dir=`pwd`
export_single() {
comp=$1
cp -a $image_dir/$comp $export_dir/
cd $export_dir/$comp
for i in `find . -type f -a \( -name \*.so -o -name \*.dll -o -name \*.jnilib \)` ; do
$strip_tool $i
done
for i in bin/* ; do
$strip_tool $i
done
cd $this_dir
echo "DU image $image_dir/$comp"
du -hs $image_dir/$comp
echo "DU export $export_dir/$comp"
du -hs $export_dir/$comp
}
export_it() {
mkdir -p $export_dir
export_single j2re-compact1-image
export_single j2re-compact2-image
export_single j2re-compact3-image
export_single j2re-image
}
export_it 2>&1 | tee -a $logfile
|