2014-06-13 20:47:02 +03:00
|
|
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
|
|
|
# See LICENSE for details.
|
|
|
|
|
|
|
|
from click import command, echo, style
|
|
|
|
|
2014-07-30 22:40:11 +03:00
|
|
|
from platformio.platforms.base import PlatformFactory
|
2014-06-13 20:47:02 +03:00
|
|
|
|
|
|
|
|
|
|
|
@command("update", short_help="Update installed platforms")
|
|
|
|
def cli():
|
|
|
|
|
2014-11-22 23:55:17 +02:00
|
|
|
installed_platforms = PlatformFactory.get_platforms(
|
|
|
|
installed=True).keys()
|
2014-11-29 22:55:32 +02:00
|
|
|
installed_platforms.sort()
|
2014-11-22 23:55:17 +02:00
|
|
|
|
|
|
|
for platform in installed_platforms:
|
2014-06-13 20:47:02 +03:00
|
|
|
echo("\nPlatform %s" % style(platform, fg="cyan"))
|
|
|
|
echo("--------")
|
|
|
|
p = PlatformFactory().newPlatform(platform)
|
|
|
|
p.update()
|