diff --git a/.gitignore b/.gitignore index 1a46d1347a..180c1a5cc0 100644 --- a/.gitignore +++ b/.gitignore @@ -30,9 +30,3 @@ GPATH .submodule *.built *.completed - -/esp-idf* -/esp-quick-toolchain/ -/esp32/ -/rp2040/ -/samples/Basic_Serial/files/ diff --git a/Sming/Arch/Esp32/Tools/install.sh b/Sming/Arch/Esp32/Tools/install.sh index 571a71bde6..7e252ae1d5 100755 --- a/Sming/Arch/Esp32/Tools/install.sh +++ b/Sming/Arch/Esp32/Tools/install.sh @@ -32,26 +32,26 @@ case $DIST in ;; *) - _OK=1 - _COMMANDS=(dfu-util bison flex gperf) - for _COMMAND in "${_COMMANDS[@]}"; do - if ! [ -x $(command -v "${_COMMAND}") ]; then - _OK=0 - echo "Install programm ${_COMMAND}" - fi - done - _INCLUDES=("/usr/include/ffi.h" "/usr/include/ssl/ssl.h") - for _INCLUDE in "${_INCLUDES[@]}"; do - if ! [ -f "${_INCLUDE}" ]; then - _OK=0 - echo "Install development package providing ${_INCLUDE}" - fi - done - if [ $_OK != 1 ]; then - echo "ABORTING" - exit 1 - fi - PACKAGES=() + TOOLS_MISSING=0 + COMMANDS=(dfu-util bison flex gperf) + for COMMAND in "${COMMANDS[@]}"; do + if ! [ -x $(command -v "${COMMAND}") ]; then + TOOLS_MISSING=1 + echo "Install programm ${COMMAND}" + fi + done + INCLUDES=("/usr/include/ffi.h" "/usr/include/ssl/ssl.h") + for INCLUDE in "${INCLUDES[@]}"; do + if ! [ -f "${INCLUDE}" ]; then + TOOLS_MISSING=1 + echo "Install development package providing ${INCLUDE}" + fi + done + if [ $TOOLS_MISSING != 0 ]; then + echo "ABORTING" + exit 1 + fi + PACKAGES=() ;; esac diff --git a/Tools/export.sh b/Tools/export.sh index f52b5449d7..602bc4423a 100755 --- a/Tools/export.sh +++ b/Tools/export.sh @@ -24,8 +24,7 @@ if [ -z "$SMING_HOME" ]; then else _SOURCEDIR=$(dirname "${BASH_SOURCE[0]}") fi - _SMIG_BASE=$(realpath "$_SOURCEDIR/..") - SMING_HOME=${_SMIG_BASE}"/Sming" + SMING_HOME=$(realpath "$_SOURCEDIR/../Sming") export SMING_HOME echo "SMING_HOME: $SMING_HOME" fi @@ -34,14 +33,14 @@ fi export PYTHON=${PYTHON:=$(which python3)} # Esp8266 -export ESP_HOME=${ESP_HOME:=${_SMIG_BASE}/esp-quick-toolchain} +export ESP_HOME=${ESP_HOME:=/opt/esp-quick-toolchain} # Esp32 -export IDF_PATH=${IDF_PATH:=${_SMIG_BASE}/esp-idf} -export IDF_TOOLS_PATH=${IDF_TOOLS_PATH:=${_SMIG_BASE}/esp32} +export IDF_PATH=${IDF_PATH:=/opt/esp-idf} +export IDF_TOOLS_PATH=${IDF_TOOLS_PATH:=/opt/esp32} # Rp2040 -export PICO_TOOLCHAIN_PATH=${PICO_TOOLCHAIN_PATH:=${_SMIG_BASE}/rp2040} +export PICO_TOOLCHAIN_PATH=${PICO_TOOLCHAIN_PATH:=/opt/rp2040} # Provide non-apple CLANG (e.g. for rbpf library) if [ -n "$GITHUB_ACTIONS" ] && [ "$(uname)" = "Darwin" ]; then diff --git a/Tools/install.sh b/Tools/install.sh index 7dd3a00cec..ec22c8f3da 100755 --- a/Tools/install.sh +++ b/Tools/install.sh @@ -99,9 +99,9 @@ elif [ -n "$(command -v dnf)" ]; then DIST=fedora PKG_INSTALL="sudo dnf install -y" else - _OK=1 + TOOLS_MISSING=0 echo "Unsupported distribution" - _REQUIRED_TOOLS=( + REQUIRED_TOOLS=( ccache \ cmake \ curl \ @@ -114,13 +114,13 @@ else pip3 \ wget \ ) - for _TOOL in "${_REQUIRED_TOOLS[@]}"; do - if ! [ -x $(command -v "${_TOOL}") ]; then - _OK=0 - echo "Install required tool ${_TOOL}" + for TOOL in "${REQUIRED_TOOLS[@]}"; do + if ! [ -x $(command -v "${TOOL}") ]; then + TOOLS_MISSING=1 + echo "Install required tool ${TOOL}" fi done - if [ $_OK != 1 ]; then + if [ $TOOLS_MISSING != 0 ]; then if [ $sourced = 1 ]; then return 1 else diff --git a/samples/Basic_Serial/.gitignore b/samples/Basic_Serial/.gitignore new file mode 100644 index 0000000000..bb97907eef --- /dev/null +++ b/samples/Basic_Serial/.gitignore @@ -0,0 +1 @@ +/files/