diff --git a/buildroot/bin/build_marlin b/buildroot/bin/build_marlin index 12c3bd4feb..3255346291 100755 --- a/buildroot/bin/build_marlin +++ b/buildroot/bin/build_marlin @@ -1,3 +1,8 @@ #!/usr/bin/env bash -arduino --verify --board arduino:avr:mega:cpu=atmega2560 Marlin/Marlin.ino +case "$#" in + 0 ) BOARD=arduino:avr:mega:cpu=atmega2560 ;; + * ) BOARD=arduino:avr:$1 ;; +esac + +arduino --verify --board $BOARD Marlin/Marlin.ino diff --git a/buildroot/bin/build_marlin_fail b/buildroot/bin/build_marlin_fail index 506426ebea..e18105cdd4 100755 --- a/buildroot/bin/build_marlin_fail +++ b/buildroot/bin/build_marlin_fail @@ -1,7 +1,4 @@ #!/usr/bin/env bash -if arduino --verify --board arduino:avr:mega:cpu=atmega2560 Marlin/Marlin.ino ; then - return 1 -else - return 0 -fi +build_marlin $@ && exit 0 +exit 1