import click
from project.utils import config, repos
@click.command('sync')
@click.option('--private', default=False)
@click.option('--clean', default=False)
def cli(private, clean):
if clean:
print("Cleaning")
repos.clean()
if not config.has_basics():
print("You do not have all the basic requirements set.")
return 1
error = repos.clone_public_data()
if error:
if private:
if not config.get('private_repo'):
print("private repo not set")
error = repos.clone_private_data()
return int(error)