From 184b482a98a5047726250507baae5d16d81bb804 Mon Sep 17 00:00:00 2001 From: Alex Szczuczko Date: Tue, 25 Sep 2012 21:34:26 -0400 Subject: Update boards_txt path in bin/ard-parse-boards to include environment variable ARDUINO_DIR This corrects the behaviour of ard-parse-boards --boards , which would fail if the path to boards.txt on the system didn't match the value which was hardcoded. --- bin/ard-parse-boards | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/ard-parse-boards') diff --git a/bin/ard-parse-boards b/bin/ard-parse-boards index e2de71b..de046c0 100755 --- a/bin/ard-parse-boards +++ b/bin/ard-parse-boards @@ -9,7 +9,7 @@ use YAML; my %Opt = ( - boards_txt => '/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/boards.txt', + boards_txt => "$ENV{'ARDUINO_DIR'}/hardware/arduino/boards.txt", ); GetOptions(\%Opt, -- cgit v1.2.3 From 86b7b034dc241ca3469d199e67ad3b278ef80114 Mon Sep 17 00:00:00 2001 From: Alistair MacLeod Date: Sun, 21 Oct 2012 21:05:56 +0100 Subject: Changed shebang to use /usr/bin/env --- bin/ard-parse-boards | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/ard-parse-boards') diff --git a/bin/ard-parse-boards b/bin/ard-parse-boards index e2de71b..9f690e2 100755 --- a/bin/ard-parse-boards +++ b/bin/ard-parse-boards @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#! /usr/bin/env perl use strict; use warnings; -- cgit v1.2.3 From ec7f239bce5a7df695a2bdbba6ee46c3b39f028d Mon Sep 17 00:00:00 2001 From: Sudar Date: Mon, 17 Dec 2012 17:12:12 +0530 Subject: Check if ARDUINO_DIR Env variable is defined or not --- bin/ard-parse-boards | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bin/ard-parse-boards') diff --git a/bin/ard-parse-boards b/bin/ard-parse-boards index 680acee..2e975bb 100755 --- a/bin/ard-parse-boards +++ b/bin/ard-parse-boards @@ -8,9 +8,14 @@ use Pod::Usage; use YAML; my %Opt = - ( - boards_txt => "$ENV{'ARDUINO_DIR'}/hardware/arduino/boards.txt", - ); + ( + boards_txt => '/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/boards.txt', + ); + +# if the ARDUINO_DIR is defined, then use it +if (defined $ENV{'ARDUINO_DIR'}) { + $Opt{boards_txt} = "$ENV{'ARDUINO_DIR'}/hardware/arduino/boards.txt"; +} GetOptions(\%Opt, "boards_txt=s", # filename of the boards.txt file -- cgit v1.2.3