mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-11-06 18:12:47 +01:00
22 lines
478 B
Bash
22 lines
478 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
|
||
|
|
# build mqtt examples with make if $1=="make", with cmake otherwise
|
||
|
|
set -o errexit # Exit if command failed.
|
||
|
|
|
||
|
|
if [ -z $IDF_PATH ] ; then
|
||
|
|
echo "Mandatory variables undefined"
|
||
|
|
exit 1;
|
||
|
|
fi;
|
||
|
|
|
||
|
|
examples="tcp ssl ssl_mutual_auth ws wss"
|
||
|
|
for i in $examples; do
|
||
|
|
echo "Building MQTT example $i"
|
||
|
|
cd $IDF_PATH/examples/protocols/mqtt/$i
|
||
|
|
if [[ "$1" = "make" ]]; then
|
||
|
|
make defconfig
|
||
|
|
make -j 4
|
||
|
|
else
|
||
|
|
idf.py build
|
||
|
|
fi;
|
||
|
|
done
|