-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·38 lines (29 loc) · 988 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
if [ "$DESKTOP_SESSION" == "gshell" ]; then
# Fix when using LiveG OS since `emsdk` confuses LiveG OS for macOS
export EMSDK_OS=linux
fi
tools/api/builder.sh
for appPath in apps/*/; do
apps/build.sh $(basename $appPath)
done
if [ "$1" == "--install-dev" ]; then
sudo apt-get install clang lld xxd binaryen
if ! [ -x "$(command -v pio)" ]; then
echo "Installing PlatformIO..."
sudo apt-get install python3.10-venv
curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python3 get-platformio.py
rm get-platformio.py
fi
echo "Installing emsdk..."
devdeps/emsdk/emsdk install latest
devdeps/emsdk/emsdk activate latest
elif [ "$1" == "--sim" ]; then
source devdeps/emsdk/emsdk_env.sh
emcmake cmake .
make
elif [ "$1" == "--upload" ]; then
pio run -t upload -e ${2:-adafruit_feather_nrf52840_sense}
else
pio run
fi