Check if ARDUINO_DIR Env variable is defined or not
This commit is contained in:
parent
4446705995
commit
ec7f239bce
1 changed files with 8 additions and 3 deletions
|
@ -8,9 +8,14 @@ use Pod::Usage;
|
||||||
use YAML;
|
use YAML;
|
||||||
|
|
||||||
my %Opt =
|
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,
|
GetOptions(\%Opt,
|
||||||
"boards_txt=s", # filename of the boards.txt file
|
"boards_txt=s", # filename of the boards.txt file
|
||||||
|
|
Loading…
Reference in a new issue