Files
esp-mqtt/ci/set_idf.sh
T

20 lines
567 B
Bash
Executable File

#!/usr/bin/env bash
# sets up the IDF repo incl submodules with specified version as $1
set -o errexit # Exit if command failed.
if [ -z $IDF_PATH ] || [ -z $MQTT_PATH ] || [ -z $1 ] ; then
echo "Mandatory variables undefined"
exit 1;
fi;
echo "Checking out IDF version $1"
cd $IDF_PATH
# Cleans out the untracked files in the repo, so the next "git checkout" doesn't fail
git clean -f
git checkout $1
# Removes the mqtt submodule, not the next submodule update doesn't fail
rm -rf $IDF_PATH/components/mqtt/esp-mqtt
./tools/ci/mirror-submodule-update.sh