File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,30 @@ EXE=$2
11
11
mkdir -p $OUTPUT
12
12
rm -rf $OUTPUT /*
13
13
14
- cp -a $EXE $OUTPUT
14
+ add_binary ()
15
+ {
16
+ destfile=" $OUTPUT /` basename $1 ` "
17
+ if [ ! -f $destfile ] ; then
18
+ cp -anv $1 $destfile
19
+ objdump -x $1 | grep " DLL Name" | cut -d: -f2 > ${destfile} .objdeps
20
+ fi
21
+ }
22
+
15
23
last_file_count=0
24
+ add_binary $EXE
16
25
17
26
while true ; do
18
- file_count=` ls -1 $OUTPUT /* | wc -l`
27
+ file_count=` ls -1 $OUTPUT /* .objdeps | wc -l`
19
28
echo " count=$file_count "
20
29
if [ $file_count -eq $last_file_count ] ; then break ; fi
21
30
last_file_count=$file_count
22
31
23
- objdump -x $OUTPUT /* | grep " DLL Name " | cut -d: -f2 | sort | uniq | while read i ; do
32
+ cat $OUTPUT /* .objdeps | sort | uniq | while read i ; do
24
33
dll=` echo $i ` # fixup weird line endings
25
34
if [[ -f /mingw32/bin/$dll ]] ; then
26
- cp -anv /mingw32/bin/$dll $OUTPUT
35
+ add_binary /mingw32/bin/$dll
27
36
fi
28
37
done
29
38
done
39
+
40
+ rm -rf $OUTPUT /* .objdeps
You can’t perform that action at this time.
0 commit comments