Update test scripts to error on unknown (#16229)

This commit is contained in:
Jeff Eberl
2019-12-19 20:03:42 -07:00
committed by Scott Lahteine
parent d81de7f521
commit 70325a6a0f
10 changed files with 41 additions and 25 deletions

View File

@ -7,4 +7,5 @@ PIN=$2
VAL=$3
SED=$(which gsed || which sed)
eval "${SED} -E -i 's/(\/\/)?(#define +${PIN}\b).*$/\2 ${VAL}/g' Marlin/src/pins/$DIR/pins_${NAM}.h"
eval "${SED} -i '/\(\/\/\)*\(#define \+${PIN}\b\).*$/{s//\2 ${VAL}/;h};\${x;/./{x;q0};x;q9}' Marlin/src/pins/$DIR/pins_${NAM}.h" ||
(echo "ERROR: pins_set Can't find ${PIN}" >&2 && exit 9)