From 0966e8e5f3df8cfd2d96c470fcfca6095f23a4b1 Mon Sep 17 00:00:00 2001 From: Sudar Date: Sun, 23 Dec 2012 15:42:30 +0530 Subject: [PATCH] Auto detect sketchbook location even in MAC --- arduino-mk/Arduino.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index b915445..ec5a758 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -478,6 +478,14 @@ ifndef ARDUINO_SKETCHBOOK $(HOME)/.arduino/preferences.txt | \ sed -e 's/sketchbook.path=//' ) endif + + # on mac + ifneq ($(wildcard $(HOME)/Library/Arduino/preferences.txt),) + ARDUINO_SKETCHBOOK = $(shell grep --max-count=1 --regexp="sketchbook.path=" \ + $(HOME)/Library/Arduino/preferences.txt | \ + sed -e 's/sketchbook.path=//' ) + endif + ifneq ($(ARDUINO_SKETCHBOOK),) $(call show_config_variable,ARDUINO_SKETCHBOOK,[AUTODETECTED],(in arduino preferences file)) else