diff --git a/IDE/Espressif/ESP-IDF/setup.sh b/IDE/Espressif/ESP-IDF/setup.sh index 8d10a59b72..6bde0b0cd6 100755 --- a/IDE/Espressif/ESP-IDF/setup.sh +++ b/IDE/Espressif/ESP-IDF/setup.sh @@ -1,11 +1,19 @@ #!/bin/bash -# check if IDF_PATH is set +# check if INSTALL_PATH is set if [ -z "$IDF_PATH" ]; then - echo "Please follows the instruction of ESP-IDF installation and set IDF_PATH." + echo "Please follows the instruction of ESP-IDF installation and set $IDF_PATH." exit 1 fi +# check if INSTALL_PATH is set +if [ -z "$INSTALL_PATH" ]; then + echo "INSTALL_PATH not defined." + exit 1 +fi + + + RMDCMD='/bin/rm -rf' MKDCMD='/bin/mkdir' CPDCMD='/bin/cp' @@ -19,8 +27,8 @@ BASEDIR=`cd ${BASEDIR} && pwd -P` # echo $WOLFSSL_ESPIDFDIR -WOLFSSLLIB_TRG_DIR=${IDF_PATH}/components/wolfssl -WOLFSSLEXP_TRG_DIR=${IDF_PATH}/examples/protocols +WOLFSSLLIB_TRG_DIR=${INSTALL_PATH}/components/wolfssl +WOLFSSLEXP_TRG_DIR=${INSTALL_PATH}/examples/protocols if [ "$1" == "--verbose" ]; then WOLFSSL_SETUP_VERBOSE=true @@ -36,15 +44,15 @@ if [ "${WOLFSSL_SETUP_VERBOSE}" == "true" ]; then echo "" fi -if [ ! -d $IDF_PATH ]; then - echo "ESP-IDF Development Framework doesn't exist.: $IDF_PATH" +if [ ! -d $INSTALL_PATH ]; then + echo "ESP-IDF Development Framework doesn't exist.: $INSTALL_PATH" exit 1 fi # Copy files into ESP-IDF development framework -pushd $IDF_PATH > /dev/null +pushd $INSTALL_PATH > /dev/null -echo "Copy files into $IDF_PATH" +echo "Copy files into $INSTALL_PATH" # Remove/Create directories if [ "${WOLFSSL_SETUP_VERBOSE}" == "true" ]; then