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
|
|
|
|
|
|
|
|
from platformio.pkgmanager import PackageManager
|
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():
|
|
|
|
|
|
|
|
for platform in PackageManager.get_installed().keys():
|
|
|
|
echo("\nPlatform %s" % style(platform, fg="cyan"))
|
|
|
|
echo("--------")
|
|
|
|
p = PlatformFactory().newPlatform(platform)
|
|
|
|
p.update()
|