diff options
| author | Sudar <sudar@sudarmuthu.com> | 2012-07-13 22:56:48 +0530 |
|---|---|---|
| committer | Sudar <sudar@sudarmuthu.com> | 2012-07-13 22:56:48 +0530 |
| commit | ad005789a0c690fff7bda56e801c55fc80215c8d (patch) | |
| tree | 3468bce9d73d70eea753bddba28abfdac54a2af0 /arduino-mk | |
| parent | aabe3d2c58c468e20b5d6e6792a6267a04945129 (diff) | |
Changed bytes option for the head shell command, so that it works in Mac as well
Diffstat (limited to 'arduino-mk')
| -rw-r--r-- | arduino-mk/Arduino.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 94e6bea..06870ec 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -101,6 +101,7 @@ # - Categorize libs into user and system (https://github.com/rpavlik/) # - Dump size at the end of the build (https://github.com/rpavlik/) # - Lots and lots of improvements (https://github.com/rpavlik/) +# - Changed bytes option for the head shell command, so that it works in Mac as well ######################################################################## # # DEPENDENCIES @@ -229,7 +230,7 @@ dir_if_exists = $(if $(wildcard $(1)$(2)),$(1)) # For message printing: pad the right side of the first argument with spaces to # the number of bytes indicated by the second argument. -space_pad_to = $(shell echo $(1) " " | head --bytes=$(2)) +space_pad_to = $(shell echo $(1) " " | head -c$(2)) # Call with some text, and a prefix tag if desired (like [AUTODETECTED]), show_config_info = $(info - $(call space_pad_to,$(2),20) $(1)) @@ -272,7 +273,7 @@ ifndef ARDUINO_VERSION # Remove all the decimals, and right-pad with zeros, and finally grab the first 3 bytes. # Works for 1.0 and 1.0.1 - AUTO_ARDUINO_VERSION := $(shell cat $(ARDUINO_DIR)/lib/version.txt | sed -e 's/[.]//g' -e 's/$$/0000/' | head --bytes=3) + AUTO_ARDUINO_VERSION := $(shell cat $(ARDUINO_DIR)/lib/version.txt | sed -e 's/[.]//g' -e 's/$$/0000/' | head -c3) ifdef AUTO_ARDUINO_VERSION ARDUINO_VERSION = $(AUTO_ARDUINO_VERSION) $(call show_config_variable,ARDUINO_VERSION,[AUTODETECTED]) |
