Skip to content

Commit f39b6dd

Browse files
committed
try detecing if its a learning repo
1 parent 37dc6a1 commit f39b6dd

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

build_platform.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919

2020
os.environ["PATH"] += os.pathsep + BUILD_DIR + "/bin"
2121
print("build dir:", BUILD_DIR)
22+
23+
IS_LEARNING_SYS = False
24+
if "Adafruit_Learning_System_Guides" in BUILD_DIR:
25+
IS_LEARNING_SYS = True
26+
2227
#os.system('pwd')
2328
#os.system('ls -lA')
2429

@@ -127,12 +132,17 @@ def run_or_die(cmd, error):
127132
print()
128133

129134
# link test library folder to the arduino libraries folder
130-
os.symlink(BUILD_DIR, os.environ['HOME']+'/Arduino/libraries/Adafruit_Test_Library')
135+
if not IS_LEARNING_SYS:
136+
os.symlink(BUILD_DIR, os.environ['HOME']+'/Arduino/libraries/Adafruit_Test_Library')
131137

132138
################################ Install dependancies
133139
our_name=None
134140
try:
135-
libprop = open(BUILD_DIR+'/library.properties')
141+
if IS_LEARNING_SYS:
142+
libprop = open(BUILD_DIR+'/library.deps')
143+
print("Found library.deps!")
144+
else:
145+
libprop = open(BUILD_DIR+'/library.properties')
136146
for line in libprop:
137147
if line.startswith("name="):
138148
our_name = line.replace("name=", "").strip()

0 commit comments

Comments
 (0)