3 cur_dir="./resource/csdk/connectivity/"
5 spec=`ls ./resource/csdk/connectivity/build/tizen/packaging/*.spec`
6 version=`rpm --query --queryformat '%{version}\n' --specfile $spec`
8 name=`echo $name|cut -d" " -f 1`
9 version=`echo $version|cut -d" " -f 1`
14 export TARGET_TRANSPORT=$1
17 export BUILD_SAMPLE=$2
19 echo $TARGET_TRANSPORT
31 cp -R $cur_dir/* $sourcedir/tmp/con
32 cp -R $cur_dir/SConscript $sourcedir/tmp/con
33 cp -R $cur_dir/src/ip_adapter/SConscript $sourcedir/tmp/con/src/ip_adapter/
34 cp -R $cur_dir/src/bt_le_adapter/SConscript $sourcedir/tmp/con/src/bt_le_adapter/
35 cp -R $cur_dir/src/bt_edr_adapter/SConscript $sourcedir/tmp/con/src/bt_edr_adapter/
36 cp -R $cur_dir/common/SConscript $sourcedir/tmp/con/common/
37 cp -R $cur_dir/lib/libcoap-4.1.1/SConscript $sourcedir/tmp/con/lib/libcoap-4.1.1/
38 cp -R $cur_dir/samples/tizen/ $sourcedir/tmp/con/sample/
39 mkdir -p $sourcedir/tmp/con/sample/lib/tizen/ble/libs
40 cp -R $cur_dir/lib/tizen/ble/libs/* $sourcedir/tmp/con/sample/lib/tizen/ble/libs/
42 mkdir -p $sourcedir/tmp/iotivityconfig
43 cd $sourcedir/build_common/
44 cp -R ./iotivityconfig/* $sourcedir/tmp/iotivityconfig/
45 cp -R ./SConscript $sourcedir/tmp/
48 cd $cur_dir/build/tizen
50 cp -R ./* $sourcedir/tmp/
51 cp SConscript $sourcedir/tmp/
52 cp SConstruct $sourcedir/tmp/
53 cp scons/SConscript $sourcedir/tmp/scons/
59 # Initialize Git repository
60 if [ ! -d .git ]; then
62 git config user.email "you@example.com"
63 git config user.name "Your Name"
65 git commit -m "Initial commit"
68 echo "Calling core gbs build command"
69 gbscommand="gbs build -A armv7l --include-all --define 'TARGET_TRANSPORT $1' --define 'RELEASE $3'"
71 if eval $gbscommand; then
72 echo "Core build is successful"
74 echo "Core build failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
80 if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
83 # Initialize Git repository
84 if [ ! -d .git ]; then
86 git config user.email "you@example.com"
87 git config user.name "Your Name"
89 git commit -m "Initial commit"
91 echo "Calling sample gbs build command"
92 gbscommand="gbs build -A armv7l --include-all --define 'TARGET_TRANSPORT $1'"
94 if eval $gbscommand; then
95 echo "Sample build is successful"
97 echo "Sample build is failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
103 rm -rf $sourcedir/tmp