diff options
| author | Sudar <sudar@sudarmuthu.com> | 2013-05-18 21:34:52 -0700 |
|---|---|---|
| committer | Sudar <sudar@sudarmuthu.com> | 2013-05-18 21:34:52 -0700 |
| commit | fdf6a75d8bc3f0d3cb9e138838ed4e86f88891c1 (patch) | |
| tree | 8ec61e7706a74d81aa6b542432ade0c197efa2c0 /bin/ard-parse-boards | |
| parent | 184230fcf2ac9075fee642be8948d406913cb7df (diff) | |
| parent | 6e08e2356ef4e6bb6e3cb5bef853975dc20848b3 (diff) | |
Merge pull request #38 from sudar/master
Merge all changes from Sudar's fork into upstream
Diffstat (limited to 'bin/ard-parse-boards')
| -rwxr-xr-x | bin/ard-parse-boards | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/ard-parse-boards b/bin/ard-parse-boards index e2de71b..2e975bb 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; @@ -8,9 +8,14 @@ use Pod::Usage; use YAML; my %Opt = - ( - boards_txt => '/Applications/Arduino.app/Contents/Resources/Java/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 |
