forked from jdiehl/async-network
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake
executable file
·33 lines (26 loc) · 1016 Bytes
/
make
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
#! /bin/bash
BUILDROOT=build
TEMPROOT=temp
# check out
git submodule init
git submodule update
# build
xcodebuild build -target AsyncNetwork | egrep "^(===|\*\*)"
xcodebuild build -target AsyncNetworkIOS -sdk iphoneos | egrep "^(===|\*\*)"
xcodebuild build -target AsyncNetworkIOS -sdk iphonesimulator | egrep "^(===|\*\*)"
# make distribution copy
mkdir -p $TEMPROOT
cp -rf Examples Icon.png LICENSE README.md $BUILDROOT/Release/* $BUILDROOT/Release-iphoneos/*\
$TEMPROOT
lipo -o $TEMPROOT/AsyncNetworkIOS.framework/AsyncNetworkIOS -create\
$BUILDROOT/Release-iphoneos/AsyncNetworkIOS.framework/AsyncNetworkIOS\
$BUILDROOT/Release-iphonesimulator/AsyncNetworkIOS.framework/AsyncNetworkIOS
rm -rf $TEMPROOT/Examples/*/*.xcodeproj/project.xcworkspace
rm -rf $TEMPROOT/Examples/*/*.xcodeproj/xcuserdata
# create disk image
rm -f AsyncNetwork.dmg
hdiutil create -srcfolder $TEMPROOT -fs HFS+ -volname AsyncNetwork AsyncNetwork.dmg
# move frameworks
cp -rf $TEMPROOT/AsyncNetwork* .
# clean up
rm -rf $TEMPROOT