Skip to content

Commit cb1ba72

Browse files
committed
Add copy-header.sh
1 parent 46a10e8 commit cb1ba72

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ js/src/build-osx/*
5151
js/src/build-linux/*
5252
!js/src/build-android/build.sh
5353
!js/src/build-ios/build.sh
54+
!js/src/build-ios/copy-header.sh
5455
!js/src/build-win32/build.sh
5556
!js/src/build-osx/build.sh
5657
!js/src/build-linux/build.sh

js/src/build-ios/copy-header.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
src_dir="dist/include/"
4+
dst_dir=$1
5+
6+
# Walk through a folder
7+
function foo ()
8+
{
9+
dir=$1
10+
for entry in $dir
11+
do
12+
if [ -d "$entry" ] ; then
13+
foo "$entry/*"
14+
else
15+
if [ -f "$entry" ]; then
16+
file="`readlink $entry`"
17+
if [ ! "$entry" ]; then
18+
file="$entry"
19+
fi
20+
cp "$file" "$dst_dir/$entry"
21+
fi
22+
fi
23+
done
24+
}
25+
26+
cd $src_dir
27+
28+
foo "*"

0 commit comments

Comments
 (0)