|
@@ -28,6 +28,7 @@ OPTIONS
|
28
|
28
|
-a --autobuild PIO Build using the MOTHERBOARD environment.
|
29
|
29
|
-u --autoupload PIO Upload using the MOTHERBOARD environment.
|
30
|
30
|
-v --verbose Extra output for debugging.
|
|
31
|
+ -s --silent Silence build output from PlatformIO.
|
31
|
32
|
|
32
|
33
|
env shortcuts: tree due esp lin lpc|lpc8 lpc9 m128 m256|mega stm|f1 f4 f7 s6 teensy|t31|t32 t35|t36 t40|t41
|
33
|
34
|
"
|
|
@@ -62,6 +63,7 @@ while getopts 'abhmruvyn:t:-:' OFLAG; do
|
62
|
63
|
esac
|
63
|
64
|
;;
|
64
|
65
|
r) REBUILD=1 ; bugout "Rebuilding previous..." ;;
|
|
66
|
+ s) SILENT_FLAG="-s" ;;
|
65
|
67
|
t) TESTENV="$OPTARG" ; bugout "Got a target: $TESTENV" ;;
|
66
|
68
|
u) AUTO_BUILD=2 ; bugout "Auto-Upload target..." ;;
|
67
|
69
|
v) DEBUG=1 ; bugout "Debug ON" ;;
|
|
@@ -105,8 +107,8 @@ if ((REBUILD)); then
|
105
|
107
|
# Build with the last-built env
|
106
|
108
|
[[ -f "$STATE_FILE" ]] || { errout "No previous (-r) build state found." ; exit 1 ; }
|
107
|
109
|
read TESTENV <"$STATE_FILE"
|
108
|
|
- pio run -s -d . -e $TESTENV
|
109
|
|
- exit
|
|
110
|
+ pio run $SILENT_FLAG -d . -e $TESTENV
|
|
111
|
+ exit 0
|
110
|
112
|
fi
|
111
|
113
|
|
112
|
114
|
case $TESTENV in
|
|
@@ -189,12 +191,12 @@ if ((AUTO_BUILD)); then
|
189
|
191
|
|
190
|
192
|
if ((AUTO_BUILD == 2)); then
|
191
|
193
|
echo "Uploading environment $TARGET for board $MB ($BNUM)..." ; echo
|
192
|
|
- pio run -t upload -e $TARGET
|
|
194
|
+ pio run $SILENT_FLAG -t upload -e $TARGET
|
193
|
195
|
else
|
194
|
196
|
echo "Building environment $TARGET for board $MB ($BNUM)..." ; echo
|
195
|
|
- pio run -s -e $TARGET
|
|
197
|
+ pio run $SILENT_FLAG -e $TARGET
|
196
|
198
|
fi
|
197
|
|
- exit
|
|
199
|
+ exit 0
|
198
|
200
|
fi
|
199
|
201
|
|
200
|
202
|
#
|
|
@@ -306,6 +308,6 @@ fi
|
306
|
308
|
|
307
|
309
|
[[ $BUILD_YES == 'Y' || $BUILD_YES == 'Yes' ]] && {
|
308
|
310
|
((USE_MAKE)) && make tests-single-local TEST_TARGET=$TESTENV ONLY_TEST=$CHOICE
|
309
|
|
- ((USE_MAKE)) || pio run -s -d . -e $TESTENV
|
|
311
|
+ ((USE_MAKE)) || pio run $SILENT_FLAG -d . -e $TESTENV
|
310
|
312
|
echo "$TESTENV" >"$STATE_FILE"
|
311
|
313
|
}
|