def use(ctx, software_root, default, option, without_package, version): '''Switch environment to given release version''' cmd = Cmd() ctx.obj['config_entry']['software_root'] = software_root ctx.obj['config_entry']['option'] = parse_lines(option) ctx.obj['config_entry']['scenario'] = version cmd.execute('use', ctx.obj, default, without_package)
def install(ctx, software_root, release_repo, release_source, option, reinstall, update, no_software, force, yes, version): '''Install specified release version''' cmd = Cmd() ctx.obj['config_entry']['software_root'] = software_root ctx.obj['config_entry']['release_repo'] = release_repo ctx.obj['config_entry']['release_source'] = release_source ctx.obj['config_entry']['option'] = parse_lines(option) ctx.obj['config_entry']['scenario'] = version cmd.execute('install', ctx.obj, reinstall, update, no_software, force, yes)
def ls_pkg(ctx): '''List all packages of the current release versions''' cmd = Cmd('ls-pkg') cmd.execute(ctx.obj)
def upgrade(ctx): '''Upgrade bsm to the latest version''' cmd = Cmd() cmd.execute('upgrade', ctx.obj)
def init(ctx, no_default, show_script): '''Initialize bsm environment''' cmd = Cmd() ctx.obj['config_entry']['default_scenario'] = not no_default cmd.execute('init', ctx.obj, no_default, show_script, ctx.obj['output']['shell'])
def home(ctx): '''Display home directory of bsm''' cmd = Cmd() cmd.execute('home', ctx.obj)
def pkg_edit(ctx, category, subdir, version, option, package): '''Edit package configuration''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('pkg-edit', ctx.obj, category, subdir, version, package)
def pkg_path(ctx, category, subdir, version, option, list_all, package): '''List package path''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('pkg-path', ctx.obj, category, subdir, version, list_all, package)
def pkg_remove(ctx, category, subdir, version, option, force, package): '''Remove a package''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('pkg-remove', ctx.obj, category, subdir, version, force, package)
def current(ctx): '''List current release''' cmd = Cmd() cmd.execute('current', ctx.obj)
def default(ctx): '''List default release''' cmd = Cmd() cmd.execute('default', ctx.obj)
def ls(ctx, software_root): '''List installed release versions''' cmd = Cmd() ctx.obj['software_root'] = software_root cmd.execute('ls', ctx.obj)
def ls_remote(ctx, release_repo, list_all, tag): '''List all available release versions''' cmd = Cmd() ctx.obj['release_repo'] = release_repo cmd.execute('ls-remote', ctx.obj, list_all, tag)
def init(ctx, show_script): '''Initialize bsm environment''' cmd = Cmd() cmd.execute('init', ctx.obj, show_script=show_script, shell=ctx.obj['output']['shell'])
def pack(ctx, destination, version): '''Create tar packages for the specified release version''' cmd = Cmd('pack') cmd.execute(ctx.obj, destination=destination, version_name=version)
def pkg_use(ctx, category, subdir, version, option, package): '''Load a package''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('pkg-use', ctx.obj, category, subdir, version, package)
def pkg_build(ctx, category, subdir, version, option, rebuild, package): '''Build a package''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('pkg-build', ctx.obj, category, subdir, version, rebuild, package)
def refresh(ctx, option): '''Refresh the current release version environment''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('refresh', ctx.obj)
def pkg_config(ctx, category, subdir, version, option, package): '''List package config''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('pkg-config', ctx.obj, category, subdir, version, package)
def run(ctx, option, command): '''Run release command''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('run', ctx.obj, command)
def pkg_clean(ctx, package): '''Clean a package''' cmd = Cmd() cmd.execute('pkg-clean', ctx.obj, package)
def clean(ctx): '''Clean the current release version environment''' cmd = Cmd() cmd.execute('clean', ctx.obj)
def version(ctx): '''Display version information''' cmd = Cmd() cmd.execute('version', ctx.obj)
def pkg_ls(ctx, list_all, option, package): '''List all packages of the current release versions''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('pkg-ls', ctx.obj, list_all, package)
def setup(ctx, shell): '''Get the setup script''' cmd = Cmd() cmd.execute('setup', ctx.obj, shell)
def pkg_init(ctx, package_root, option, yes): '''Initialize a new package from directory''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('pkg-init', ctx.obj, package_root, yes)
def exit(ctx, show_script): '''Exit bsm environment completely''' cmd = Cmd() cmd.execute('exit', ctx.obj, show_script, ctx.obj['output']['shell'])
def pkg_install(ctx, category, subdir, version, category_origin, subdir_origin, version_origin, package, option, reinstall, yes): '''Install specified package''' cmd = Cmd() ctx.obj['config_entry']['option'] = parse_lines(option) ctx.obj['config_entry']['reinstall'] = reinstall cmd.execute('pkg-install', ctx.obj, category, subdir, version, category_origin, subdir_origin, version_origin, package, yes)
def config(ctx, version, option, config_type, item_list): '''Display configuration, mostly for debug purpose''' cmd = Cmd() ctx.obj['config_entry']['scenario'] = version ctx.obj['config_entry']['option'] = parse_lines(option) cmd.execute('config', ctx.obj, config_type, item_list)
def pkg_install(ctx, package): '''Install specified package''' cmd = Cmd() cmd.execute('pkg-install', ctx.obj)