1#! /bin/bash -e
2# Generate esp32_mbedtls_errors.c for use in the Esp32 port, with the ESP-IDF version of mbedtls
3# The IDF_PATH env var must be set to the top-level dir of ESPIDF
4echo "IDF_PATH=$IDF_PATH"
5MBEDTLS=$IDF_PATH/components/mbedtls/mbedtls
6patch -o esp32_generate_errors.pl $MBEDTLS/scripts/generate_errors.pl <generate_errors.diff
7perl ./esp32_generate_errors.pl $MBEDTLS/include/mbedtls . esp32_mbedtls_errors.c
8