From 7bca9e949749cb8598b6cb4ad481e8d04efceaff Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 24 Jan 2017 10:27:55 +0100 Subject: [PATCH] tools/keyboardio-builder: Only add -libraries, if needed If there are no local libraries installed, do not add the directory to the arduino-builder commandline. Signed-off-by: Gergely Nagy --- tools/keyboardio-builder | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/keyboardio-builder b/tools/keyboardio-builder index 07fe2b12..f387a1e5 100755 --- a/tools/keyboardio-builder +++ b/tools/keyboardio-builder @@ -114,6 +114,10 @@ compile () { ${compile_HOOKS} + if [ -d "${ARDUINO_LOCAL_LIB_PATH}/libraries" ]; then + local_LIBS="-libraries \"${ARDUINO_LOCAL_LIB_PATH}/libraries\"" + fi + ${ARDUINO_BUILDER} \ -compile \ -hardware "${ARDUINO_PATH}/hardware" \ @@ -121,7 +125,7 @@ compile () { ${ARDUINO_TOOLS_PARAM} \ -tools "${ARDUINO_PATH}/tools-builder" \ -fqbn "${FQBN}" \ - -libraries "${ARDUINO_LOCAL_LIB_PATH}/libraries" \ + ${local_LIBS} \ -libraries "${BOARD_HARDWARE_PATH}/.." \ -libraries "${ROOT}" \ ${EXTRA_BUILDER_ARGS} \