aboutsummaryrefslogtreecommitdiff
path: root/Arduino.mk
diff options
context:
space:
mode:
authorSudar Muthu <sudar@sudarmuthu.com>2016-07-29 20:48:27 +0530
committerGitHub <noreply@github.com>2016-07-29 20:48:27 +0530
commit0ec1489414f0bd7fbc9569d334984ef737c9f2a9 (patch)
treea32276b666951bc093a5fea9c1b73be5a75033a6 /Arduino.mk
parent5a83288e6ac01182fbf2a0cf219cc13370e67c66 (diff)
parent737a3f14cd780710dc53c080603deb4a5dd4e6da (diff)
Merge pull request #445 from sej7278/master
Fix for 1.6.10 version detection
Diffstat (limited to 'Arduino.mk')
-rw-r--r--Arduino.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/Arduino.mk b/Arduino.mk
index ffda348..eaf937f 100644
--- a/Arduino.mk
+++ b/Arduino.mk
@@ -280,10 +280,10 @@ endif
# Arduino version number
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
+ # Remove all the decimals, remove anything before/including ":", remove anything after/including "+" and finally grab the last 5 bytes.
+ # Works for 1.0 and 1.0.1 and 1.6.10 and debian-style 2:1.0.5+dfsg2-4
VERSION_FILE := $(ARDUINO_DIR)/lib/version.txt
- AUTO_ARDUINO_VERSION := $(shell [ -e $(VERSION_FILE) ] && cat $(VERSION_FILE) | sed -e 's/^[0-9]://g' -e 's/[.]//g' -e 's/$$/0000/' | head -c3)
+ AUTO_ARDUINO_VERSION := $(shell [ -e $(VERSION_FILE) ] && cat $(VERSION_FILE) | sed -e 's/^[0-9]://g' -e 's/[.]//g' -e 's/\+.*//g' | head -c5)
ifdef AUTO_ARDUINO_VERSION
ARDUINO_VERSION = $(AUTO_ARDUINO_VERSION)
$(call show_config_variable,ARDUINO_VERSION,[AUTODETECTED])