-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·52 lines (41 loc) · 959 Bytes
/
build.sh
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
47
48
49
50
export PROJECT_NAME=example
export LSPD_MODE=disable
#rem you can set your gcc path
# export GCC_PATH=/opt/gcc_mcu
export ROOT_PATH=`pwd`
if test "$1" != ""; then
export PROJECT_NAME=$1
else
echo "PROJECT not set"
fi
if test "$2" != "" ;then
export LSPD_MODE=$2
else
if test "$1" = "luatos"; then
export LSPD_MODE=enable
else
echo "LSPD_MODE not set"
fi
fi
# check csdk rndis
export RNDIS_MARK="csdk_rndis"
if [[ -f "$FILE" ]]; then
# @echo This is CSDK with RNDIS
export EC618_RNDIS=enable
export LSPD_MODE=disable
fi
echo "=============================="
echo "AirM2M https://openluat.com"
echo "=============================="
echo "PROJECT : $PROJECT_NAME "
echo "LSPD_MODE : $LSPD_MODE "
echo "RNDIS : $EC618_RNDIS"
echo "=============================="
if test "$3" = "-v"; then
xmake --root -v
else
xmake --root -w
fi
echo "-------------------------"
echo "--------DONE-------------"
echo "-------------------------"