Example #1
0
def configs():
    """Returns two config instances"""
    config_1 = Config()
    config_2 = Config()

    yield [config_1, config_2]

    # pylint: disable=protected-access
    config_1._instance = None
    config_2._instance = None
Example #2
0
""" Wrappers for installing AUR packages
"""

from utils import spawn, log
from config.shared import Config

config = Config()


def sync(args=""):
    """Sync repos and install packages"""

    spawn.process(f"{config.aur_helper} --noconfirm -Sua {args}")
    log.write("Synced AUR packages")


def install(args):
    """Install packages, no sync"""

    if len(args) > 0:
        spawn.process(f"{config.aur_helper} --noconfirm -S {args}")
        log.write(f"(AUR) Installed: {args}")