Our previous conditional building was really wrong. It never built if any .hex existed.

This new version is still wrong, but less so. It at least checks the timestamp on the sketch

Signed-off-by: Jesse Vincent <jesse@keyboard.io>
pull/918/head
Jesse Vincent 4 years ago
parent 181fa00350
commit 08bb9c5a14
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -333,8 +333,12 @@ maybe_build () {
build_version
build_paths
build_filenames
if [ ! -e "${HEX_FILE_PATH}" ]; then
# If the hex file is older than the sketch file, or the hex file does not exist
# then rebuild. This is not as correct as letting make check our dependencies
# But it's less broken for most user use cases
# TODO(anyone): Make this suck less
SKETCH_FILE_PATH=$(absolute_filename "${SKETCH_DIR}/${SKETCH}.ino")
if [ "${HEX_FILE_PATH}" -ot "${SKETCH_FILE_PATH}" ]; then
build "$@"
fi

Loading…
Cancel
Save