2021-03-20 18:43:31 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# This script is used in the docker containers to preinstall
|
|
|
|
# all platformio libraries in the global storage
|
|
|
|
|
|
|
|
import configparser
|
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
|
2021-09-15 19:10:42 +02:00
|
|
|
config = configparser.ConfigParser(inline_comment_prefixes=(';', ))
|
2021-03-20 18:43:31 +01:00
|
|
|
config.read(sys.argv[1])
|
2021-09-15 19:10:42 +02:00
|
|
|
libs = [x for x in config['common']['lib_deps'].splitlines() if len(x) != 0]
|
2021-03-20 18:43:31 +01:00
|
|
|
|
2021-09-15 19:13:30 +02:00
|
|
|
subprocess.check_call(['platformio', 'lib', '-g', 'install', *libs])
|