Skip to content

Commit e4d8ca2

Browse files
committed
changes
1 parent c0d865f commit e4d8ca2

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
log_errors.txt
12
log_instEnviroment.txt
23
log_idfBuild.txt
34
log_pythonBuild.txt
45
esp-idf
56
components/arduino
67
out
8+
dist
79
.DS_Store
810
.vscode
911
managed_components/

build.sh

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,26 +112,30 @@ echo "TARGET(s): ${TARGET[@]}"
112112

113113
mkdir -p dist
114114
rm -f "log_*.txt" # remove old log files if any exists
115+
touch log_errors.txt && touch log_instEnviroment.txt && touch log_idfBuild.txt && touch log_pythonBuild.txt
115116

116117
if [ $SKIP_ENV -eq 0 ]; then
117118
echo "* Installing/Updating ESP-IDF and all components..."
118119
# update components from git
119-
./tools/update-components.sh >> log_instEnviroment.txt
120+
osascript -e 'tell application "Terminal" to do script "tail -n 20 -f '$(realpath log_errors.txt)'"'
121+
osascript -e 'tell application "Terminal" to do script "tail -n 20 -f '$(realpath log_instEnviroment.txt)'"'
122+
./tools/update-components.sh 1>> log_instEnviroment.txt 2>> log_errors.txt
120123
if [ $? -ne 0 ]; then exit 1; fi
121124

122125
# install arduino component
123-
./tools/install-arduino.sh >> log_instEnviroment.txt
126+
./tools/install-arduino.sh 1>> log_instEnviroment.txt 2>> log_errors.txt
124127
if [ $? -ne 0 ]; then exit 1; fi
125128

126129
# install esp-idf
127-
source ./tools/install-esp-idf.sh >> log_instEnviroment.txt
130+
source ./tools/install-esp-idf.sh 1>> log_instEnviroment.txt 2>> log_errors.txt
128131
if [ $? -ne 0 ]; then exit 1; fi
129132
else
130133
# $IDF_PATH/install.sh
131134
# source $IDF_PATH/export.sh
132-
source ./tools/config.sh >> log_instEnviroment.txt
135+
source ./tools/config.sh 1>> log_instEnviroment.txt 2>> log_errors.txt
133136
fi
134137

138+
osascript -e 'tell application "Terminal" to do script "tail -n 20 -f '$(realpath log_idfBuild.txt)'"'
135139
if [ "$BUILD_TYPE" != "all" ]; then
136140
if [ "$TARGET" = "all" ]; then
137141
echo "ERROR: You need to specify target for non-default builds"
@@ -170,7 +174,7 @@ if [ "$BUILD_TYPE" != "all" ]; then
170174

171175
echo "idf.py -DIDF_TARGET=\"$target\" -DSDKCONFIG_DEFAULTS=\"$configs\" $BUILD_TYPE"
172176
rm -rf build sdkconfig
173-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$configs" $BUILD_TYPE >> log_idfBuild.txt
177+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$configs" $BUILD_TYPE 1>> log_idfBuild.txt 2>> log_errors.txt
174178
if [ $? -ne 0 ]; then exit 1; fi
175179
done
176180
exit 0
@@ -224,11 +228,11 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
224228

225229
echo "* Build IDF-Libs: $idf_libs_configs"
226230
rm -rf build sdkconfig
227-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" idf-libs >> log_idfBuild.txt
231+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" idf-libs 1>> log_idfBuild.txt 2>> log_errors.txt
228232
if [ $? -ne 0 ]; then exit 1; fi
229233

230234
if [ "$target" == "esp32s3" ]; then
231-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" srmodels_bin >> log_idfBuild.txt
235+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" srmodels_bin 1>> log_idfBuild.txt 2>> log_errors.txt
232236
if [ $? -ne 0 ]; then exit 1; fi
233237
AR_SDK="$AR_TOOLS/esp32-arduino-libs/$target"
234238
# sr model.bin
@@ -249,7 +253,7 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
249253

250254
echo "* Build BootLoader: $bootloader_configs"
251255
rm -rf build sdkconfig
252-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$bootloader_configs" copy-bootloader >> log_idfBuild.txt
256+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$bootloader_configs" copy-bootloader 1>> log_idfBuild.txt 2>> log_errors.txt
253257
if [ $? -ne 0 ]; then exit 1; fi
254258
done
255259

@@ -262,7 +266,7 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
262266

263267
echo "* Build Memory Variant: $mem_configs"
264268
rm -rf build sdkconfig
265-
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$mem_configs" mem-variant >> log_idfBuild.txt
269+
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$mem_configs" mem-variant 1>> log_idfBuild.txt 2>> log_errors.txt
266270
if [ $? -ne 0 ]; then exit 1; fi
267271
done
268272
done
@@ -299,10 +303,11 @@ for component in `ls "$AR_MANAGED_COMPS"`; do
299303
done
300304

301305
# update package_esp32_index.template.json
306+
osascript -e 'tell application "Terminal" to do script "tail -n 20 -f '$(realpath log_pythonBuild.txt)'"'
302307
if [ "$BUILD_TYPE" = "all" ]; then
303308
echo "* Generating package_esp32_index.template.json..."
304-
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -j "$AR_COMPS/arduino/package/package_esp32_index.template.json" -o "$AR_OUT/" >> log_pythonBuild.txt
305-
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -o "$TOOLS_JSON_OUT/" >> log_pythonBuild.txt
309+
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -j "$AR_COMPS/arduino/package/package_esp32_index.template.json" -o "$AR_OUT/" 1>> log_pythonBuild.txt 2>> log_errors.txt
310+
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -o "$TOOLS_JSON_OUT/" 1>> log_pythonBuild.txt 2>> log_errors.txt
306311
if [ $? -ne 0 ]; then exit 1; fi
307312
fi
308313

@@ -313,7 +318,7 @@ if [ "$BUILD_TYPE" = "all" ]; then
313318
ibr=$(git describe --all 2>/dev/null)
314319
ic=$(git -C "$IDF_PATH" rev-parse --short HEAD)
315320
popd
316-
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic" >> log_pythonBuild.txt
321+
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic" 1>> log_pythonBuild.txt 2>> log_errors.txt
317322
if [ $? -ne 0 ]; then exit 1; fi
318323
fi
319324

0 commit comments

Comments
 (0)