Ken Van Hoeylandt 5d189fe5a3
Add macOS simulator build to pipelines (#162)
- GitHub actions changed to build simulator on macOS (it's broken, but at least we get a good code portability check for now!)
- `Buildscripts/` shell scripts updated to use `/bin/sh` so it works on macOS too
- Various includes fixed in various subprojects so the code is more portable
2025-01-12 17:48:59 +01:00

39 lines
688 B
Bash
Executable File

#!/bin/sh
#
# Usage: build.sh [boardname]
# Example: build.sh lilygo-tdeck
# Description: Makes a clean build for the specified board.
#
echoNewPhase() {
echo -e "⏳ \e[36m${1}\e[0m"
}
fatalError() {
echo -e "⚠️ \e[31m${1}\e[0m"
exit 0
}
sdkconfig_file="sdkconfig.board.${1}"
if [ $# -lt 1 ]; then
fatalError "Must pass board name as first argument. (e.g. lilygo_tdeck)"
fi
if [ ! -f $sdkconfig_file ]; then
fatalError "Board not found: ${sdkconfig_file}"
fi
echoNewPhase "Cleaning build folder"
rm -rf build
echoNewPhase "Building $sdkconfig_file"
cp $sdkconfig_file sdkconfig
if not idf.py build; then
fatalError "Failed to build esp32s3 SDK"
fi