# Path: mod/log.py
# RED = '\033[1;31m'
# GREEN = '\033[1;32m'
# YELLOW = '\033[1;33m'
# BLUE = '\033[1;36m'
# DEF = '\033[0;0m'
# def error(msg, fatal=True) :
# def warn(msg) :
# def ok(item, status) :
# def failed(item, status) :
# def optional(item, status) :
# def info(msg) :
# def colored(color, msg) :
# 
# Path: mod/wasisdk.py
# def get_sdk_dir(fips_dir):
# def check_exists(fips_dir):
# def get_url():
# def get_archive_path(fips_dir):
# def get_wasisdk_root(fips_dir):
# def sdk_dir_exists(fips_dir):
# def ensure_sdk_dirs(fips_dir) :
# def install(fips_dir):
# def uninstall(fips_dir):


from mod import log, wasisdk
"""
    wasi-sdk installation and maintenance
"""

def run(fips_dir, proj_dir, args):
    if len(args) > 0:
        cmd = args[0]
        if cmd == 'install':
            wasisdk.install(fips_dir)
        elif cmd == 'uninstall':
            wasisdk.uninstall(fips_dir)
        else:
            log.error("unknown subcommand '{}' (run './fips help wasisdk')".format(cmd))
    else:
        log.error("expected a subcommand (install or uninstall)")
        
def help():
    log.info(log.YELLOW +
             "fips wasisdk install\n"
             "fips wasisdk uninstall\n"

# Path: mod/log.py
# RED = '\033[1;31m'
# GREEN = '\033[1;32m'
# YELLOW = '\033[1;33m'
# BLUE = '\033[1;36m'
# DEF = '\033[0;0m'
# def error(msg, fatal=True) :
# def warn(msg) :
# def ok(item, status) :
# def failed(item, status) :
# def optional(item, status) :
# def info(msg) :
# def colored(color, msg) :
# 
# Path: mod/wasisdk.py
# def get_sdk_dir(fips_dir):
# def check_exists(fips_dir):
# def get_url():
# def get_archive_path(fips_dir):
# def get_wasisdk_root(fips_dir):
# def sdk_dir_exists(fips_dir):
# def ensure_sdk_dirs(fips_dir) :
# def install(fips_dir):
# def uninstall(fips_dir):


# Path: verbs/wasisdk.py
from mod import log, wasisdk

"""
    wasi-sdk installation and maintenance
"""

def run(fips_dir, proj_dir, args):
    if len(args) > 0:
        cmd = args[0]
        if cmd == 'install':
            wasisdk.install(fips_dir)
        elif cmd == 'uninstall':
            wasisdk.uninstall(fips_dir)
        else:
            log.error("unknown subcommand '{}' (run './fips help wasisdk')".format(cmd))
    else:
        log.error("expected a subcommand (install or uninstall)")
        
def help():
    log.info(log.YELLOW +
             "fips wasisdk install\n"
             "fips wasisdk uninstall\n"

             + log.DEF +